Irrlicht 3D Engine
irr::scene::SMesh Struct Reference

Simple implementation of the IMesh interface. More...

#include <SMesh.h>

+ Inheritance diagram for irr::scene::SMesh:

Public Member Functions

 SMesh ()
 constructor More...
 
virtual ~SMesh ()
 destructor More...
 
void addMeshBuffer (IMeshBuffer *buf)
 adds a MeshBuffer More...
 
virtual void clear ()
 clean mesh More...
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const
 returns an axis aligned bounding box More...
 
virtual IMeshBuffergetMeshBuffer (u32 nr) const
 returns pointer to a mesh buffer More...
 
virtual IMeshBuffergetMeshBuffer (const video::SMaterial &material) const
 returns a meshbuffer which fits a material More...
 
virtual u32 getMeshBufferCount () const
 returns amount of mesh buffers. More...
 
void recalculateBoundingBox ()
 recalculates the bounding box More...
 
virtual void setBoundingBox (const core::aabbox3df &box)
 set user axis aligned bounding box More...
 
virtual void setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
 flags the meshbuffer as changed, reloads hardware buffers More...
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
 set the hardware mapping hint, for driver More...
 
virtual void setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)
 sets a flag of all contained materials to a new value More...
 
- Public Member Functions inherited from irr::scene::IMesh
virtual E_ANIMATED_MESH_TYPE getMeshType () const
 Returns the type of the meshes. More...
 
- Public Member Functions inherited from irr::IReferenceCounted
 IReferenceCounted ()
 Constructor. More...
 
virtual ~IReferenceCounted ()
 Destructor. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
const c8getDebugName () const
 Returns the debug name of the object. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 

Public Attributes

core::aabbox3d< f32BoundingBox
 The bounding box of this mesh. More...
 
core::array< IMeshBuffer * > MeshBuffers
 The meshbuffers of this mesh. More...
 

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object. More...
 

Detailed Description

Simple implementation of the IMesh interface.

Definition at line 18 of file SMesh.h.

Constructor & Destructor Documentation

◆ SMesh()

irr::scene::SMesh::SMesh ( )
inline

constructor

Definition at line 21 of file SMesh.h.

References irr::IReferenceCounted::setDebugName().

◆ ~SMesh()

virtual irr::scene::SMesh::~SMesh ( )
inlinevirtual

destructor

Definition at line 29 of file SMesh.h.

References irr::IReferenceCounted::drop(), and MeshBuffers.

Member Function Documentation

◆ addMeshBuffer()

void irr::scene::SMesh::addMeshBuffer ( IMeshBuffer buf)
inline

adds a MeshBuffer

The bounding box is not updated automatically.

Definition at line 111 of file SMesh.h.

References irr::IReferenceCounted::grab(), and MeshBuffers.

◆ clear()

virtual void irr::scene::SMesh::clear ( )
inlinevirtual

clean mesh

Definition at line 37 of file SMesh.h.

References BoundingBox, irr::IReferenceCounted::drop(), MeshBuffers, and irr::core::aabbox3d< T >::reset().

◆ getBoundingBox()

virtual const core::aabbox3d<f32>& irr::scene::SMesh::getBoundingBox ( ) const
inlinevirtual

returns an axis aligned bounding box

Implements irr::scene::IMesh.

Definition at line 72 of file SMesh.h.

References BoundingBox.

◆ getMeshBuffer() [1/2]

virtual IMeshBuffer* irr::scene::SMesh::getMeshBuffer ( u32  nr) const
inlinevirtual

returns pointer to a mesh buffer

Implements irr::scene::IMesh.

Definition at line 53 of file SMesh.h.

References MeshBuffers.

◆ getMeshBuffer() [2/2]

virtual IMeshBuffer* irr::scene::SMesh::getMeshBuffer ( const video::SMaterial material) const
inlinevirtual

returns a meshbuffer which fits a material

reverse search

Implements irr::scene::IMesh.

Definition at line 60 of file SMesh.h.

References MeshBuffers.

◆ getMeshBufferCount()

virtual u32 irr::scene::SMesh::getMeshBufferCount ( ) const
inlinevirtual

returns amount of mesh buffers.

Implements irr::scene::IMesh.

Definition at line 47 of file SMesh.h.

References MeshBuffers.

◆ recalculateBoundingBox()

void irr::scene::SMesh::recalculateBoundingBox ( )
inline

◆ setBoundingBox()

virtual void irr::scene::SMesh::setBoundingBox ( const core::aabbox3df box)
inlinevirtual

set user axis aligned bounding box

Implements irr::scene::IMesh.

Definition at line 78 of file SMesh.h.

References BoundingBox.

◆ setDirty()

virtual void irr::scene::SMesh::setDirty ( E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX)
inlinevirtual

flags the meshbuffer as changed, reloads hardware buffers

Implements irr::scene::IMesh.

Definition at line 135 of file SMesh.h.

References MeshBuffers.

◆ setHardwareMappingHint()

virtual void irr::scene::SMesh::setHardwareMappingHint ( E_HARDWARE_MAPPING  newMappingHint,
E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX 
)
inlinevirtual

set the hardware mapping hint, for driver

Implements irr::scene::IMesh.

Definition at line 128 of file SMesh.h.

References MeshBuffers.

◆ setMaterialFlag()

virtual void irr::scene::SMesh::setMaterialFlag ( video::E_MATERIAL_FLAG  flag,
bool  newvalue 
)
inlinevirtual

sets a flag of all contained materials to a new value

Implements irr::scene::IMesh.

Definition at line 121 of file SMesh.h.

References MeshBuffers.

Member Data Documentation

◆ BoundingBox

core::aabbox3d<f32> irr::scene::SMesh::BoundingBox

The bounding box of this mesh.

Definition at line 145 of file SMesh.h.

Referenced by clear(), getBoundingBox(), recalculateBoundingBox(), and setBoundingBox().

◆ MeshBuffers

core::array<IMeshBuffer*> irr::scene::SMesh::MeshBuffers

The documentation for this struct was generated from the following file: