This is a wrapper class around our HW Mesh.
Both our new and old HW mesh derive from this class and the pointer to this class is used to pass the HW mesh around. The old code would just pass around a DWORD_PTR and then cast it to internal HW Mesh.
#include <HWMesh.h>
Public Member Functions |
|
virtual | ~IHWSubMesh () |
virtual void | Draw (GraphicsWindow *gw, DWORD attribute)=0 |
Draws the mesh to the display using the
current render limits. |
|
virtual void | UpdateVertexBuffer (Point3 *vertexList, Point3 *gfxNormalList, Point3 *faceNormalList, BitArray &changedVerts, int count, unsigned int *vertMapList, int *normalsMapList)=0 |
Allows you direct access to the low level
buffer to change values without recreating the mesh. |
virtual ~IHWSubMesh | ( | ) | [inline, virtual] |
{ }
virtual void Draw | ( | GraphicsWindow * | gw, |
DWORD | attribute | ||
) | [pure virtual] |
Draws the mesh to the display using the current render limits.
gw | The diffuse color |
attribute | If this mesh contains multiple matIDs this is which matID to draw. The old hwmesh stored multiple matIDs per mesh the new one only has one. |
virtual void UpdateVertexBuffer | ( | Point3 * | vertexList, |
Point3 * | gfxNormalList, | ||
Point3 * | faceNormalList, | ||
BitArray & | changedVerts, | ||
int | count, | ||
unsigned int * | vertMapList, | ||
int * | normalsMapList | ||
) | [pure virtual] |
Allows you direct access to the low level buffer to change values without recreating the 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 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. |