arsa  2.7
Public Member Functions | List of all members
irr::scene::IMesh Class Referenceabstract

Class which holds the geometry of an object. More...

#include <IMesh.h>

Inheritance diagram for irr::scene::IMesh:
irr::IReferenceCounted irr::scene::IAnimatedMesh irr::scene::SMesh irr::scene::IAnimatedMeshMD2 irr::scene::IAnimatedMeshMD3 irr::scene::IQ3LevelMesh irr::scene::ISkinnedMesh irr::scene::SAnimatedMesh

Public Member Functions

virtual u32 getMeshBufferCount () const =0
 Get the amount of mesh buffers. More...
 
virtual IMeshBuffergetMeshBuffer (u32 nr) const =0
 Get pointer to a mesh buffer. More...
 
virtual IMeshBuffergetMeshBuffer (const video::SMaterial &material) const =0
 Get pointer to a mesh buffer which fits a material. More...
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const =0
 Get an axis aligned bounding box of the mesh. More...
 
virtual void setBoundingBox (const core::aabbox3df &box)=0
 Set user-defined axis aligned bounding box. More...
 
virtual void setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)=0
 Sets a flag of all contained materials to a new value. More...
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0
 Set the hardware mapping hint. More...
 
virtual void setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0
 Flag the meshbuffer as changed, reloads hardware buffers. More...
 
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...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
const c8getDebugName () const
 Returns the debug name of the object. 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

Class which holds the geometry of an object.

An IMesh is nothing more than a collection of some mesh buffers (IMeshBuffer). SMesh is a simple implementation of an IMesh. A mesh is usually added to an IMeshSceneNode in order to be rendered.

Definition at line 71 of file IMesh.h.

Member Function Documentation

◆ getBoundingBox()

virtual const core::aabbox3d<f32>& irr::scene::IMesh::getBoundingBox ( ) const
pure virtual

Get an axis aligned bounding box of the mesh.

Returns
Bounding box of this mesh.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ getMeshBuffer() [1/2]

virtual IMeshBuffer* irr::scene::IMesh::getMeshBuffer ( u32  nr) const
pure virtual

Get pointer to a mesh buffer.

Parameters
nrZero based index of the mesh buffer. The maximum value is getMeshBufferCount() - 1;
Returns
Pointer to the mesh buffer or 0 if there is no such mesh buffer.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ getMeshBuffer() [2/2]

virtual IMeshBuffer* irr::scene::IMesh::getMeshBuffer ( const video::SMaterial material) const
pure virtual

Get pointer to a mesh buffer which fits a material.

Parameters
materialmaterial to search for
Returns
Pointer to the mesh buffer or 0 if there is no such mesh buffer.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ getMeshBufferCount()

virtual u32 irr::scene::IMesh::getMeshBufferCount ( ) const
pure virtual

Get the amount of mesh buffers.

Returns
Amount of mesh buffers (IMeshBuffer) in this mesh.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ getMeshType()

virtual E_ANIMATED_MESH_TYPE irr::scene::IMesh::getMeshType ( ) const
inlinevirtual

Returns the type of the meshes.

This is useful for making a safe downcast. For example, if getMeshType() returns EAMT_MD2 it's safe to cast the IMesh to IAnimatedMeshMD2. Note: It's no longer just about animated meshes, that name has just historical reasons.

Returns
Type of the mesh

Reimplemented in irr::scene::SAnimatedMesh, and irr::scene::IAnimatedMesh.

Definition at line 124 of file IMesh.h.

125  {
126  return EAMT_STATIC;
127  }
generic non-animated mesh
Definition: IMesh.h:60

◆ setBoundingBox()

virtual void irr::scene::IMesh::setBoundingBox ( const core::aabbox3df box)
pure virtual

Set user-defined axis aligned bounding box.

Parameters
boxNew bounding box to use for the mesh.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ setDirty()

virtual void irr::scene::IMesh::setDirty ( E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX)
pure virtual

Flag the meshbuffer as changed, reloads hardware buffers.

This method has to be called every time the vertices or indices have changed. Otherwise, changes won't be updated on the GPU in the next render cycle.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ setHardwareMappingHint()

virtual void irr::scene::IMesh::setHardwareMappingHint ( E_HARDWARE_MAPPING  newMappingHint,
E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX 
)
pure virtual

Set the hardware mapping hint.

This methods allows to define optimization hints for the hardware. This enables, e.g., the use of hardware buffers on platforms that support this feature. This can lead to noticeable performance gains.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

◆ setMaterialFlag()

virtual void irr::scene::IMesh::setMaterialFlag ( video::E_MATERIAL_FLAG  flag,
bool  newvalue 
)
pure virtual

Sets a flag of all contained materials to a new value.

Parameters
flagFlag to set in all materials.
newvalueNew value to set in all materials.

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.


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