Go to the source code of this file.
Classes | |
class | ItemPartColor |
struct | ItemMesh |
class | WieldMeshSceneNode |
Functions | |
void | getItemMesh (Client *client, const ItemStack &item, ItemMesh *result) |
scene::SMesh * | getExtrudedMesh (ITextureSource *tsrc, const std::string &imagename, const std::string &overlay_name) |
void | postProcessNodeMesh (scene::SMesh *mesh, const ContentFeatures &f, bool use_shaders, bool set_material, const video::E_MATERIAL_TYPE *mattype, std::vector< ItemPartColor > *colors, bool apply_scale=false) |
scene::SMesh * getExtrudedMesh | ( | ITextureSource * | tsrc, |
const std::string & | imagename, | ||
const std::string & | overlay_name | ||
) |
References cloneMesh(), cloneMeshBuffer(), ExtrusionMeshCache::create(), g_extrusion_mesh_cache, ITextureSource::getTexture(), ITextureSource::getTextureForMesh(), and scaleMesh().
Referenced by getItemMesh().
References ItemMesh::buffer_colors, cloneMesh(), TileLayer::color, ExtrusionMeshCache::createCube(), createSpecialNodeMesh(), ContentFeatures::drawtype, FATAL_ERROR_IF, g_extrusion_mesh_cache, NodeDefManager::get(), ItemStack::getDefinition(), getExtrudedMesh(), NodeDefManager::getId(), ItemStack::getInventoryImage(), ItemStack::getInventoryOverlay(), ITextureSource::getTextureName(), TileLayer::has_color, ITEM_NODE, TileSpec::layers, ItemMesh::mesh, ItemDefinition::name, NDT_AIRLIKE, NDT_ALLFACES, NDT_FLOWINGLIQUID, NDT_LIQUID, NDT_NORMAL, NDT_PLANTLIKE, NDT_PLANTLIKE_ROOTED, ItemMesh::needs_shading, ContentFeatures::needsBackfaceCulling(), ItemDefinition::place_param2, postProcessNodeMesh(), rotateMeshXZby(), rotateMeshYZby(), scaleMesh(), MapNode::setParam2(), ContentFeatures::special_tiles, TileLayer::texture_id, ContentFeatures::tiles, translateMesh(), ItemDefinition::type, and ContentFeatures::visual_scale.
Referenced by CItemDefManager::createClientCachedDirect().
void postProcessNodeMesh | ( | scene::SMesh * | mesh, |
const ContentFeatures & | f, | ||
bool | use_shaders, | ||
bool | set_material, | ||
const video::E_MATERIAL_TYPE * | mattype, | ||
std::vector< ItemPartColor > * | colors, | ||
bool | apply_scale = false |
||
) |
Applies overlays, textures and optionally materials to the given mesh and extracts tile colors for colorization.
mattype | overrides the buffer's material type, but can also be NULL to leave the original material. |
colors | returns the colors of the mesh buffers in the mesh. |
References TileLayer::animation_frame_count, TileLayer::applyMaterialOptions(), cloneMeshBuffer(), TileLayer::color, TileLayer::flags_texture, TileLayer::frames, TileLayer::has_color, TileSpec::layers, MAX_TILE_LAYERS, FrameSpec::normal_texture, TileLayer::normal_texture, TileLayer::scale, FrameSpec::texture, TileLayer::texture, TileLayer::texture_id, ContentFeatures::tiles, and TileSpec::world_aligned.
Referenced by getItemMesh(), and WieldMeshSceneNode::setCube().