MeshVertex Class Reference


Detailed Description

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>

Inheritance diagram for MeshVertex:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

DllExport MeshVertex ( )

Constructor.


Member Function Documentation

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.

Parameters:
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

Parameters:
id is the vertex to add

MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex
MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex MeshVertex