Minetest  5.4.0
WieldMeshSceneNode Class Reference

#include <wieldmesh.h>

+ Inheritance diagram for WieldMeshSceneNode:
+ Collaboration diagram for WieldMeshSceneNode:

Public Member Functions

 WieldMeshSceneNode (scene::ISceneManager *mgr, s32 id=-1, bool lighting=false)
 
virtual ~WieldMeshSceneNode ()
 
void setCube (const ContentFeatures &f, v3f wield_scale)
 
void setExtruded (const std::string &imagename, const std::string &overlay_image, v3f wield_scale, ITextureSource *tsrc, u8 num_frames)
 
void setItem (const ItemStack &item, Client *client, bool check_wield_image=true)
 
void setColor (video::SColor color)
 
void setNodeLightColor (video::SColor color)
 
scene::IMesh * getMesh ()
 
virtual void render ()
 
virtual const aabb3fgetBoundingBox () const
 

Private Member Functions

void changeToMesh (scene::IMesh *mesh)
 

Private Attributes

scene::IMeshSceneNode * m_meshnode = nullptr
 
video::E_MATERIAL_TYPE m_material_type
 
bool m_lighting
 
bool m_enable_shaders
 
bool m_anisotropic_filter
 
bool m_bilinear_filter
 
bool m_trilinear_filter
 
std::vector< ItemPartColorm_colors
 
video::SColor m_base_color
 
aabb3f m_bounding_box
 

Constructor & Destructor Documentation

◆ WieldMeshSceneNode()

WieldMeshSceneNode::WieldMeshSceneNode ( scene::ISceneManager *  mgr,
s32  id = -1,
bool  lighting = false 
)

References ExtrusionMeshCache::createCube(), g_extrusion_mesh_cache, g_settings, Settings::getBool(), m_anisotropic_filter, m_bilinear_filter, m_enable_shaders, m_meshnode, and m_trilinear_filter.

+ Here is the call graph for this function:

◆ ~WieldMeshSceneNode()

WieldMeshSceneNode::~WieldMeshSceneNode ( )
virtual

Member Function Documentation

◆ changeToMesh()

void WieldMeshSceneNode::changeToMesh ( scene::IMesh *  mesh)
private

References ExtrusionMeshCache::createCube(), g_extrusion_mesh_cache, m_lighting, and m_meshnode.

Referenced by setCube(), setExtruded(), and setItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBoundingBox()

virtual const aabb3f& WieldMeshSceneNode::getBoundingBox ( ) const
inlinevirtual

References m_bounding_box.

◆ getMesh()

scene::IMesh* WieldMeshSceneNode::getMesh ( )
inline

References m_meshnode.

◆ render()

void WieldMeshSceneNode::render ( )
virtual

◆ setColor()

void WieldMeshSceneNode::setColor ( video::SColor  color)

References colorizeMeshBuffer(), m_base_color, m_colors, m_enable_shaders, m_lighting, m_meshnode, and setMeshBufferColor().

Referenced by GenericCAO::addToScene(), and setNodeLightColor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCube()

void WieldMeshSceneNode::setCube ( const ContentFeatures f,
v3f  wield_scale 
)

References changeToMesh(), cloneMesh(), ExtrusionMeshCache::createCube(), g_extrusion_mesh_cache, m_colors, m_material_type, m_meshnode, postProcessNodeMesh(), and WIELD_SCALE_FACTOR.

Referenced by setItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExtruded()

void WieldMeshSceneNode::setExtruded ( const std::string &  imagename,
const std::string &  overlay_image,
v3f  wield_scale,
ITextureSource tsrc,
u8  num_frames 
)

References changeToMesh(), cloneMesh(), cloneMeshBuffer(), ExtrusionMeshCache::create(), g_extrusion_mesh_cache, ITextureSource::getShaderFlagsTexture(), ITextureSource::getTexture(), m_anisotropic_filter, m_bilinear_filter, m_enable_shaders, m_material_type, m_meshnode, m_trilinear_filter, and WIELD_SCALE_FACTOR_EXTRUDED.

Referenced by setItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setItem()

void WieldMeshSceneNode::setItem ( const ItemStack item,
Client client,
bool  check_wield_image = true 
)

◆ setNodeLightColor()

void WieldMeshSceneNode::setNodeLightColor ( video::SColor  color)

References m_enable_shaders, m_meshnode, and setColor().

Referenced by GenericCAO::setNodeLight(), and Camera::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_anisotropic_filter

bool WieldMeshSceneNode::m_anisotropic_filter
private

Referenced by WieldMeshSceneNode(), and setExtruded().

◆ m_base_color

video::SColor WieldMeshSceneNode::m_base_color
private

The base color of this mesh. This is the default for all mesh buffers.

Referenced by setColor(), and setItem().

◆ m_bilinear_filter

bool WieldMeshSceneNode::m_bilinear_filter
private

◆ m_bounding_box

aabb3f WieldMeshSceneNode::m_bounding_box
private

Referenced by getBoundingBox().

◆ m_colors

std::vector<ItemPartColor> WieldMeshSceneNode::m_colors
private

Stores the colors of the mesh's mesh buffers. This does not include lighting.

Referenced by setColor(), setCube(), and setItem().

◆ m_enable_shaders

bool WieldMeshSceneNode::m_enable_shaders
private

◆ m_lighting

bool WieldMeshSceneNode::m_lighting
private

Referenced by changeToMesh(), and setColor().

◆ m_material_type

video::E_MATERIAL_TYPE WieldMeshSceneNode::m_material_type
private

Referenced by setCube(), setExtruded(), and setItem().

◆ m_meshnode

scene::IMeshSceneNode* WieldMeshSceneNode::m_meshnode = nullptr
private

◆ m_trilinear_filter

bool WieldMeshSceneNode::m_trilinear_filter
private

The documentation for this class was generated from the following files: