This is a container class of our sub meshes.
This class is a container for all our sub mesh. We separate each mesh by matid and vertex buffer size
#include <HWMesh.h>
Public Member Functions |
|
DllExport | HWTupleMeshContainer () |
Constructor. |
|
DllExport | ~HWTupleMeshContainer () |
Destructor. |
|
DllExport void | FreeMeshes () |
This frees all the sub meshes and sets the
sub mesh count to 0. |
|
DllExport unsigned int | Count () |
Returns the number of sub meshes. |
|
DllExport GFX_MESH::HWTupleMesh * | Get (unsigned int id) |
Returns a specific sub mesh. |
|
DllExport void | Append (GFX_MESH::HWTupleMesh *hwMesh) |
Appends a sub mesh to the list. |
|
DllExport void | Draw (GraphicsWindow *gw, DWORD attribute) |
Draws all meshes that match the attribute.
|
|
DllExport void | UpdateVertexBuffer (Point3 *vertexList, Point3 *gfxNormalList, Point3 *faceNormalList, BitArray &changedVerts, int count, unsigned int *vertMapList, int *normalsMapList) |
Lets you update the vertex buffers. |
|
DllExport void | Release () |
Releases this class pointer. |
DllExport HWTupleMeshContainer | ( | ) |
Constructor.
DllExport ~HWTupleMeshContainer | ( | ) |
Destructor.
DllExport void FreeMeshes | ( | ) |
This frees all the sub meshes and sets the sub mesh count to 0.
DllExport unsigned int Count | ( | ) |
Returns the number of sub meshes.
DllExport GFX_MESH::HWTupleMesh* Get | ( | unsigned int | id | ) |
Returns a specific sub mesh.
DllExport void Append | ( | GFX_MESH::HWTupleMesh * | hwMesh | ) |
Appends a sub mesh to the list.
The container will manage the life of the pointer
hwMesh | is the mesh to append to the end of the list |
DllExport void Draw | ( | GraphicsWindow * | gw, |
DWORD | attribute | ||
) | [virtual] |
Draws all meshes that match the attribute.
gw | the graphics window to draw to |
attribute | the mat id to check |
Implements IHWDrawMesh.
DllExport void UpdateVertexBuffer | ( | Point3 * | vertexList, |
Point3 * | gfxNormalList, | ||
Point3 * | faceNormalList, | ||
BitArray & | changedVerts, | ||
int | count, | ||
unsigned int * | vertMapList, | ||
int * | normalsMapList | ||
) | [virtual] |
Lets you update the vertex buffers.
Allows you to change the position and normals of the mesh without recreating the hw mesh
vertexList | This is a pointer of all the vertices on the mesh |
gfxNormalList | This is a pointer of all the gfx normals on the mesh |
faceNormalList | This is a pointer of all the face normals on the mesh |
changedVerts | This is a bitarray of all the changed verts |
count | This is number of vertices in vertex List |
vertMapList | This is mapping that lets the HW vertex look up which vertex it belongs to |
normalsMapList | This is mapping that lets the HW vertex look up which normal it belongs to. If this value is negative it is made positive and then face normallist is used to lookup the normal This occurs when there is no smoothing group. |
Implements IHWDrawMesh.
DllExport void Release | ( | ) | [virtual] |