Struct for holding a mesh with a single material. More...
#include <IMeshBuffer.h>
Struct for holding a mesh with a single material.
A part of an IMesh which has the same material on each face of that group. Logical groups of an IMesh need not be put into separate mesh buffers, but can be. Separately animated parts of the mesh must be put into separate mesh buffers. Some mesh buffer implementations have limitations on the number of vertices the buffer can hold. In that case, logical grouping can help. Moreover, the number of vertices should be optimized for the GPU upload, which often depends on the type of gfx card. Typial figures are 1000-10000 vertices per buffer. SMeshBuffer is a simple implementation of a MeshBuffer, which supports up to 65535 vertices.
Since meshbuffers are used for drawing, and hence will be exposed to the driver, chances are high that they are grab()'ed from somewhere. It's therefore required to dynamically allocate meshbuffers which are passed to a video driver and only drop the buffer once it's not used in the current code block anymore.
Definition at line 39 of file IMeshBuffer.h.
virtual void irr::scene::IMeshBuffer::append | ( | const void *const | vertices, |
u32 | numVertices, | ||
const u16 *const | indices, | ||
u32 | numIndices | ||
) | [pure virtual] |
Append the vertices and indices to the current buffer.
Only works for compatible vertex types.
vertices | Pointer to a vertex array. |
numVertices | Number of vertices in the array. |
indices | Pointer to index array. |
numIndices | Number of indices in array. |
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual void irr::scene::IMeshBuffer::append | ( | const IMeshBuffer *const | other | ) | [pure virtual] |
Append the meshbuffer to the current buffer.
Only works for compatible vertex types
other | Buffer to append to this one. |
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual const core::aabbox3df& irr::scene::IMeshBuffer::getBoundingBox | ( | ) | const [pure virtual] |
Get the axis aligned bounding box of this meshbuffer.
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, irr::scene::CDynamicMeshBuffer, and irr::scene::IDynamicMeshBuffer.
Referenced by irr::scene::IMeshManipulator::apply().
virtual u32 irr::scene::IMeshBuffer::getChangedID_Index | ( | ) | const [pure virtual] |
Get the currently used ID for identification of changes.
This shouldn't be used for anything outside the VideoDriver.
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual u32 irr::scene::IMeshBuffer::getChangedID_Vertex | ( | ) | const [pure virtual] |
Get the currently used ID for identification of changes.
This shouldn't be used for anything outside the VideoDriver.
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual E_HARDWARE_MAPPING irr::scene::IMeshBuffer::getHardwareMappingHint_Index | ( | ) | const [pure virtual] |
get the current hardware mapping hint
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual E_HARDWARE_MAPPING irr::scene::IMeshBuffer::getHardwareMappingHint_Vertex | ( | ) | const [pure virtual] |
get the current hardware mapping hint
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual u32 irr::scene::IMeshBuffer::getIndexCount | ( | ) | const [pure virtual] |
Get amount of indices in this meshbuffer.
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual video::E_INDEX_TYPE irr::scene::IMeshBuffer::getIndexType | ( | ) | const [pure virtual] |
Get type of index data which is stored in this meshbuffer.
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::SSharedMeshBuffer, and irr::scene::CMeshBuffer< T >.
virtual const u16* irr::scene::IMeshBuffer::getIndices | ( | ) | const [pure virtual] |
Get access to Indices.
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual u16* irr::scene::IMeshBuffer::getIndices | ( | ) | [pure virtual] |
Get access to Indices.
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual video::SMaterial& irr::scene::IMeshBuffer::getMaterial | ( | ) | [pure virtual] |
Get the material of this meshbuffer.
Implemented in irr::scene::CDynamicMeshBuffer, irr::scene::SSharedMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSkinMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual const video::SMaterial& irr::scene::IMeshBuffer::getMaterial | ( | ) | const [pure virtual] |
Get the material of this meshbuffer.
Implemented in irr::scene::CDynamicMeshBuffer, irr::scene::SSharedMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, and irr::scene::CMeshBuffer< T >.
virtual const core::vector3df& irr::scene::IMeshBuffer::getNormal | ( | u32 | i | ) | const [pure virtual] |
returns normal of vertex i
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual core::vector3df& irr::scene::IMeshBuffer::getNormal | ( | u32 | i | ) | [pure virtual] |
returns normal of vertex i
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual const core::vector3df& irr::scene::IMeshBuffer::getPosition | ( | u32 | i | ) | const [pure virtual] |
returns position of vertex i
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
Referenced by irr::scene::IMeshManipulator::apply_().
virtual core::vector3df& irr::scene::IMeshBuffer::getPosition | ( | u32 | i | ) | [pure virtual] |
returns position of vertex i
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual const core::vector2df& irr::scene::IMeshBuffer::getTCoords | ( | u32 | i | ) | const [pure virtual] |
returns texture coord of vertex i
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual core::vector2df& irr::scene::IMeshBuffer::getTCoords | ( | u32 | i | ) | [pure virtual] |
returns texture coord of vertex i
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
virtual u32 irr::scene::IMeshBuffer::getVertexCount | ( | ) | const [pure virtual] |
Get amount of vertices in meshbuffer.
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::SSharedMeshBuffer, and irr::scene::CMeshBuffer< T >.
Referenced by irr::scene::IMeshManipulator::apply_().
virtual video::E_VERTEX_TYPE irr::scene::IMeshBuffer::getVertexType | ( | ) | const [pure virtual] |
Get type of vertex data which is stored in this meshbuffer.
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::IDynamicMeshBuffer, and irr::scene::SSharedMeshBuffer.
Referenced by irr::scene::IMeshManipulator::apply_().
virtual const void* irr::scene::IMeshBuffer::getVertices | ( | ) | const [pure virtual] |
Get access to vertex data. The data is an array of vertices.
Which vertex type is used can be determined by getVertexType().
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.
Referenced by irr::scene::IMeshManipulator::apply_().
virtual void* irr::scene::IMeshBuffer::getVertices | ( | ) | [pure virtual] |
Get access to vertex data. The data is an array of vertices.
Which vertex type is used can be determined by getVertexType().
Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::SSharedMeshBuffer, and irr::scene::CMeshBuffer< T >.
virtual void irr::scene::IMeshBuffer::recalculateBoundingBox | ( | ) | [pure virtual] |
Recalculates the bounding box. Should be called if the mesh changed.
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, irr::scene::CDynamicMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual void irr::scene::IMeshBuffer::setBoundingBox | ( | const core::aabbox3df & | box | ) | [pure virtual] |
Set axis aligned bounding box.
box | User defined axis aligned bounding box to use for this buffer. |
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, irr::scene::CDynamicMeshBuffer, and irr::scene::IDynamicMeshBuffer.
Referenced by irr::scene::IMeshManipulator::apply_().
virtual void irr::scene::IMeshBuffer::setDirty | ( | E_BUFFER_TYPE | buffer = EBT_VERTEX_AND_INDEX | ) | [pure virtual] |
flags the meshbuffer as changed, reloads hardware buffers
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.
virtual void irr::scene::IMeshBuffer::setHardwareMappingHint | ( | E_HARDWARE_MAPPING | newMappingHint, |
E_BUFFER_TYPE | buffer = EBT_VERTEX_AND_INDEX |
||
) | [pure virtual] |
set the hardware mapping hint, for driver
Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.