A mapping of geometry index. More...
#include <MHWGeometry.h>
Public Member Functions | |
MGeometryIndexMapping () | |
Constructor. | |
~MGeometryIndexMapping () | |
Destructor. | |
int | geometryCount () const |
Get the number of geometry described by the mapping. More... | |
MDagPath | dagPath (int geometryIdx) const |
Get the MDagPath of a geometry. More... | |
MObject | component (int geometryIdx) const |
Get the component of a geometry. More... | |
int | indexStart (int geometryIdx) const |
Get the index start of a geometry. More... | |
int | indexLength (int geometryIdx) const |
Get the index length of a geometry. More... | |
int | vertexStart (int geometryIdx) const |
Get the vertex start of the geometry. More... | |
int | vertexLength (int geometryIdx) const |
Get the vertex length of the geometry. More... | |
MRenderItem * | sourceRenderItem (int geometryIdx) const |
Get the source render item. More... | |
void | updateSource (int geometryIdx, int indexStart, int indexLength, int vertexStart, int vertexLength) |
Update an existing entry in an MGeometryIndexMapping. More... | |
A mapping of geometry index.
This class represents the index mapping of the multiple objects concatenated into a single render item.
When multiple objects are compatible, their geometry can be consolidated into a single render item, to provide better performance by concatening their index and vertex buffers.
The Geometry Index Mapping can be used to get the indexing details of the concatenated geometries to be able to render them separately.
int geometryCount | ( | ) | const |
Get the number of geometry described by the mapping.
MDagPath dagPath | ( | int | geometryIdx | ) | const |
Get the MDagPath of a geometry.
[in] | geometryIdx | The index the geometry |
MObject component | ( | int | geometryIdx | ) | const |
Get the component of a geometry.
[in] | geometryIdx | The index the geometry |
int indexStart | ( | int | geometryIdx | ) | const |
Get the index start of a geometry.
The index start represents the offset of the geometry index data in the index buffer of the consolidated render item
[in] | geometryIdx | The index the geometry |
int indexLength | ( | int | geometryIdx | ) | const |
Get the index length of a geometry.
The index length represents the length of the geometry index data in the index buffer of the consolidated render item
[in] | geometryIdx | The index the geometry |
int vertexStart | ( | int | geometryIdx | ) | const |
Get the vertex start of the geometry.
The vertex start represents the offset in number of vertices of the geometry vertex data in the vertex buffer of the consolidated render item.
int vertexLength | ( | int | geometryIdx | ) | const |
Get the vertex length of the geometry.
The vertex length represents the length in number of vertices of the geometry vertex data in the vertex buffer of the consolidated render item.
MRenderItem * sourceRenderItem | ( | int | geometryIdx | ) | const |
Get the source render item.
[in] | geometryIdx | The index of the geometry |
void updateSource | ( | int | geometryIdx, |
int | indexStart, | ||
int | indexLength, | ||
int | vertexStart, | ||
int | vertexLength | ||
) |
Update an existing entry in an MGeometryIndexMapping.
This change is temporary and does not impact drawing until MRenderItem::setSourceIndexMapping() is called with the updated MGeometryIndexMapping.
[in] | geometryIdx | The index of the geometry |
[in] | indexStart | The new index start of the geometry |
[in] | indexLength | The new index length of the geometry |
[in] | vertexStart | The new vertex start of the geometry |
[in] | vertexLength | The new vertex length of the geometry |