this is a class used to track mesh vertices to hw vertices.
Each MeshVertes represents a max mesh vertex and has a list of indices in the HWVertex buffer which reference that mesh vertex
#include <HWVertex.h>
Public Member Functions |
|
DllExport | MeshVertex () |
Constructor. |
|
DllExport void | InitHWVert () |
clears out the mHWVertex list but does not
deallocate it |
|
DllExport void | SetSize (unsigned int s) |
sets the size of mHWVertex, this is useful
to preallocate blank space to reduce allocates for performance
reasons |
|
DllExport bool | IsInList (BYTE *hwVert, BYTE *vertexBuffer, unsigned int stride, DWORD &id) |
This is used to check to see if the mesh
vertex already references a matching hw vertex. It returns true if
so and returns that index in id. |
|
DllExport void | AddHWVert (DWORD id) |
This adds a new hw vert index to our mesh
vertex. |
DllExport MeshVertex | ( | ) |
Constructor.
DllExport void InitHWVert | ( | ) | [inline] |
clears out the mHWVertex list but does not deallocate it
DllExport void SetSize | ( | unsigned int | s | ) | [inline] |
sets the size of mHWVertex, this is useful to preallocate blank space to reduce allocates for performance reasons
DllExport bool IsInList | ( | BYTE * | hwVert, |
BYTE * | vertexBuffer, | ||
unsigned int | stride, | ||
DWORD & | id | ||
) | [inline] |
This is used to check to see if the mesh vertex already references a matching hw vertex. It returns true if so and returns that index in id.
hwVert | - this is the raw pointer to the HWVertex that we want to see if is in our list |
vertexBuffer | - this is the raw pointer of all our current HWVerticess |
stride | - this is the stride of each vertex |
id | this is the index that was found |
DllExport void AddHWVert | ( | DWORD | id | ) | [inline] |
This adds a new hw vert index to our mesh vertex.
If IsInList returns false we need to add this vertex
id | is the vertex to add |