#include <string>#include <vector>#include "irr_aabb3d.h"#include "irr_v3d.h"#include <EMaterialTypes.h>#include <IMeshSceneNode.h>#include <SColor.h>#include <memory>#include "tile.h"#include "nodedef.h"
Include dependency graph for wieldmesh.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | ItemMeshBufferInfo |
| struct | ItemMesh |
| class | WieldMeshSceneNode |
Namespaces | |
| namespace | scene |
Functions | |
| std::vector< FrameSpec > | createAnimationFrames (ITextureSource *tsrc, const std::string &image_name, const TileAnimationParams &animation, int &result_frame_length_ms) |
| scene::SMesh * | getExtrudedMesh (video::ITexture *texture, video::ITexture *overlay_texture=nullptr) |
| void | getAdHocNodeShader (video::SMaterial &mat, IShaderSource *shdsrc, const char *shader, AlphaMode mode, int layer) |
| Replace the material's shader with a custom one while respecting the usual things expected of node rendering (texture type, alpha mode, overlay). | |
| void | createItemMesh (Client *client, const ItemDefinition &def, const AnimationInfo &animation_normal, const AnimationInfo &animation_overlay, ItemMesh *result) |
| NOTE: The item mesh is only suitable for inventory rendering (due to its material types). | |
| std::vector< FrameSpec > createAnimationFrames | ( | ITextureSource * | tsrc, |
| const std::string & | image_name, | ||
| const TileAnimationParams & | animation, | ||
| int & | result_frame_length_ms ) |
References TileAnimationParams::determineParams(), ITextureSource::getTextureDimensions(), ITextureSource::getTextureForMesh(), TileAnimationParams::getTextureModifer(), TAT_NONE, and TileAnimationParams::type.
Referenced by ItemVisualsManager::createItemVisuals(), fillTileAttribs(), and WieldMeshSceneNode::setItem().
Here is the call graph for this function:
Here is the caller graph for this function:| void createItemMesh | ( | Client * | client, |
| const ItemDefinition & | def, | ||
| const AnimationInfo & | animation_normal, | ||
| const AnimationInfo & | animation_overlay, | ||
| ItemMesh * | result ) |
NOTE: The item mesh is only suitable for inventory rendering (due to its material types).
In-world rendering of items must go through WieldMeshSceneNode.
References ContentFeatures::alpha, ItemMesh::buffer_info, createGenericNodeMesh(), ContentFeatures::drawtype, extractTexture(), FATAL_ERROR_IF, g_extrusion_mesh_cache, NodeDefManager::get(), getAdHocNodeShader(), getExtrudedMesh(), NodeDefManager::getId(), AnimationInfo::getTexture(), ITextureSource::getTexture(), ITEM_NODE, TileSpec::layers, ItemMesh::mesh, ItemDefinition::name, NDT_AIRLIKE, NDT_PLANTLIKE, NDT_PLANTLIKE_ROOTED, ItemMesh::needs_shading, ItemDefinition::place_param2, rotateMeshXZby(), rotateMeshYZby(), scaleMesh(), MapNode::setParam2(), NodeVisuals::special_tiles, ContentFeatures::tiledef, ContentFeatures::tiledef_special, NodeVisuals::tiles, and ItemDefinition::type.
Referenced by ItemVisualsManager::createItemVisuals().
Here is the call graph for this function:
Here is the caller graph for this function:| void getAdHocNodeShader | ( | video::SMaterial & | mat, |
| IShaderSource * | shdsrc, | ||
| const char * | shader, | ||
| AlphaMode | mode, | ||
| int | layer ) |
Replace the material's shader with a custom one while respecting the usual things expected of node rendering (texture type, alpha mode, overlay).
Call this after TileLayer::applyMaterialOptions.
| mat | material to modify |
| shdsrc | shader source |
| shader | name of shader |
| mode | alpha mode from nodedef |
| layer | index of this layer |
References alpha_mode_to_material_type(), IShaderSource::getShader(), IShaderSource::getShaderInfo(), ShaderInfo::material, material_type_with_alpha(), and NDT_NORMAL.
Referenced by createItemMesh(), generateNodeMesh(), and WieldMeshSceneNode::setItem().
Here is the call graph for this function:
Here is the caller graph for this function:| scene::SMesh * getExtrudedMesh | ( | video::ITexture * | texture, |
| video::ITexture * | overlay_texture = nullptr ) |
References cloneMeshBuffer(), cloneStaticMesh(), ExtrusionMeshCache::create(), g_extrusion_mesh_cache, and scaleMesh().
Referenced by createItemMesh().
Here is the call graph for this function:
Here is the caller graph for this function: