Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
WieldMeshSceneNode Class Reference

#include <wieldmesh.h>

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

Public Member Functions

 WieldMeshSceneNode (scene::ISceneManager *mgr, s32 id=-1)
 
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_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
 
ShadowRendererm_shadow
 

Constructor & Destructor Documentation

◆ WieldMeshSceneNode()

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

References ShadowRenderer::addNodeToShadowList(), ExtrusionMeshCache::createCube(), g_extrusion_mesh_cache, g_settings, RenderingEngine::get_shadow_renderer(), Settings::getBool(), m_anisotropic_filter, m_bilinear_filter, m_enable_shaders, m_meshnode, m_shadow, and m_trilinear_filter.

+ Here is the call graph for this function:

◆ ~WieldMeshSceneNode()

WieldMeshSceneNode::~WieldMeshSceneNode ( )
virtual

References g_extrusion_mesh_cache, m_meshnode, m_shadow, ShadowRenderer::removeNodeFromShadowList(), and sanity_check.

+ Here is the call graph for this function:

Member Function Documentation

◆ changeToMesh()

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

References ExtrusionMeshCache::createCube(), g_extrusion_mesh_cache, m_enable_shaders, 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_meshnode, and setMeshBufferColor().

Referenced by setItem(), 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::getTexture(), m_anisotropic_filter, m_bilinear_filter, m_material_type, m_meshnode, m_trilinear_filter, setMaterialFilters(), 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(), Camera::step(), 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

◆ 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_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_shadow

ShadowRenderer* WieldMeshSceneNode::m_shadow
private

◆ m_trilinear_filter

bool WieldMeshSceneNode::m_trilinear_filter
private

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