#include <RmMesh.h>
Public Member Functions | |
| RmMeshModel () | |
| Constructor. | |
| virtual | ~RmMeshModel () |
| Destructor. | |
| void | GetGeometryStatistics (int &nNumVertices, int &nNumPrimitives) |
| Compute polygonal statistics (number of vertices, primitives). | |
| RmVertexArray * | GetVertexArray () |
| Get vertex array. | |
| const RmVertexArray * | GetVertexArray () const |
| Get vertex array. | |
| void | SetPrimitiveType (RmPrimitiveType type) |
| Set primitive type. | |
| RmPrimitiveType | GetPrimitiveType () const |
| Get primitive type. | |
| int | GetNumPrimitives () const |
| Get primitive type. | |
| void | SetNumIndices (int nNumIndices, bool bPreserve=true) |
| Set number of indices. | |
| int | GetNumIndices () const |
| Get number of indices. | |
| RM_DWORD * | GetIndices () |
| Get index buffer. | |
| const RM_DWORD * | GetIndices () const |
| Get index buffer. | |
| void | GetIndicesForPrimitive (int nPrimitiveIndex, RM_DWORD *pIndices) |
| Get indices for primitive. | |
| void | SetParent (RmMeshModel *pParent) |
| Set parent. | |
| RmMeshModel * | GetParent () |
| Get parent. | |
| const RmMeshModel * | GetParent () const |
| Get parent. | |
| RmMeshModelListIterator | BeginChildren () |
| Begin iterator. | |
| RmMeshModelListConstIterator | BeginChildren () const |
| Begin iterator. | |
| RmMeshModelListIterator | EndChildren () |
| End iterator. | |
| RmMeshModelListConstIterator | EndChildren () const |
| End iterator. | |
| int | GetNumChildren () const |
| Get number of children. | |
| void | AddChild (RmMeshModel *pChild) |
| Add child. | |
| void | RemoveChild (RmMeshModel *pChild, bool bDelete) |
| Remove child. | |
| RmMeshModelListIterator | RemoveChild (RmMeshModelListIterator itr, bool bDelete) |
| Remove child. | |
| void | RemoveAllChildren () |
| Remove all children. | |
| RmMatrix4x4 & | GetLocalTM () |
| Model transformation. | |
| const RmMatrix4x4 & | GetLocalTM () const |
| const RmMatrix4x4 & | GetWorldTM () |
| Model to world transformation. | |
| void | NotifyTMChange () |
| Notify transformation change. | |
| bool | ComputeNormals (int usageIndex, int *pSortedIndices=NULL, bool bBlendDegenVertices=false) |
| Compute normals. | |
| bool | ComputeTangents (int usageIndex, int *pSortedIndices=NULL) |
| Compute tangent and binormal. | |
| int * | CreateSortedVertexIndices (RmVertexElementArray *pPosElementtArray) |
| Create sorted indices for vertices. | |
| void | DestroySortedVertexIndices (int *pSortedIndices) |
| Destroy sorted vertex indices. | |
| void | Copy (RmMeshModel *pDestMesh, RmMeshModelContainer *pContainer) |
| Copy mesh model. | |
| void | SetBoundBoxDirty (bool bDirty) |
| Set boundbox dirty flag. | |
| void | UpdateBoundBox () |
| Update Boundbox. | |
| RmBoundBox & | GetBoundBox () |
| Get bounding box. | |
| bool | GetBoundSphere (RmVector3D ¢er, float &radius) |
| Retrieve bounding sphere. | |
| void | SetCentroidDirty (bool bDirty) |
| Set centroid dirty flag. | |
| void | UpdateCentroid () |
| Recompute centroid. | |
| RmVector3D & | GetCentroid () |
| Get centroid. | |
| RmVector3D | GetSumOfAllVertices (int &totalNumVertices) |
| Sum of all vertices. | |
| void | TransformVertices (const RmMatrix4x4 &mat) |
| Transform all vertices by matrix. | |
Mesh Class
|
|
Constructor. Constructor |
|
|
Destructor. Destructor |
|
|
Add child. Add child mesh
|
|
|
Begin iterator. Returns an iterator to the beginning of a list of child meshes
|
|
|
Begin iterator. Returns an iterator to the beginning of a list of child meshes
|
|
||||||||||||||||
|
Compute normals. Normal
eg. if usageIndex is 2, NORMAL2 will be computed for each vertex ( assuminng that NORMAL2 exist ) using POSITION2 Note * Only works with dataType = FLOAT3
|
|
||||||||||||
|
Compute tangent and binormal. pSortedIndices is the indices for vertex sorted by x,y,z Can be NULL.
|
|
||||||||||||
|
Copy mesh model. Copy ( copies data to destination )
|
|
|
Create sorted indices for vertices. Create sorted vertexindices
|
|
|
Destroy sorted vertex indices. Deallocates memory created by CreateSortedVertexIndices
|
|
|
End iterator. Returns an iterator to the Ending of a list of child meshes
|
|
|
End iterator. Returns an iterator to the Ending of a list of child meshes
|
|
|
Get bounding box. Get bounding box. If dirty flag is set, it calls update to recompute boundbox
|
|
||||||||||||
|
Retrieve bounding sphere. Get bounding sphere. Returns false if bound sphere is empty
|
|
|
Get centroid. Get centroid of mesh. If the dirty flag is set, it calls UpdateCentroid to recompute centroid.
|
|
||||||||||||
|
Compute polygonal statistics (number of vertices, primitives). Compute polygonal statistics (number of vertices, primitives) for this model container. Note: this method INCREMENTS the incoming nNumVertices and nNumPrimitives, so to start counting from the very beginning, they must be manually reset by the caller of this method.
|
|
|
Get index buffer. Get index buffer
|
|
|
Get index buffer. Get index buffer
|
|
||||||||||||
|
Get indices for primitive. Caller is responsible for having enough memory for pIndices for PrimitiveType. Eg. If PrimType is Triangle, pIndices must be able to store 3 dword. Likewise if Line, 2 dword
|
|
|
Model transformation. Model ( local )Transformation
|
|
|
Get number of children. Returns the number of child meshes
|
|
|
Get number of indices. Get number of indices
|
|
|
Get primitive type. Get primitive type
|
|
|
Get parent. Retrieve parent to mesh model
|
|
|
Get parent. Retrieve parent to mesh model
|
|
|
Get primitive type. Get primitive type
|
|
|
Sum of all vertices. Add all vertices ( xyz ) and return the result
|
|
|
Get vertex array. Vertex Array
|
|
|
Get vertex array. Vertex Array
|
|
|
Model to world transformation. Model ( local ) to world Transformation
|
|
|
Notify transformation change. Let system know that transformation of this mesh is changed
|
|
|
Remove all children. Remove all children
|
|
||||||||||||
|
Remove child. Remove child mesh
|
|
||||||||||||
|
Remove child. Remove child mesh
|
|
|
Set boundbox dirty flag. BoundBox ( currently only use POSITION0 data, must be float3 )
|
|
|
Set centroid dirty flag. Set centroid dirty flag. Set this to true, if vertices are modified.
|
|
||||||||||||
|
Set number of indices. Set index buffer size
|
|
|
Set parent. Asssign new parent to mesh model
|
|
|
Set primitive type. Primitive Type
|
|
|
Transform all vertices by matrix. Transform vertices by a given matrix Note that this method currently only transforms using the POSITION0 and NORMAL0 stream data (element arrays) for the mesh mode, which also must be of type float3.
|
|
|
Update Boundbox. Recomputes bound box
|
|
|
Recompute centroid. Recompute centroid
|
1.3.6