This class is used to help with managing 32 bit hardware index buffer.
This class is used to help with managing 32 bit hardware index buffer it is not designed to be used as representation of an entire index buffer but used to map into an existing buffer. It can be used to overlay an existing index buffer or as temp buffer to be filled out then copied into the final buffer
#include <HWIndex.h>
Public Member Functions |
|
DllExport | HWIndex32Bit (unsigned int indicesPerElement) |
Constructor. |
|
DllExport void | SetBuffer (DWORD *buffer) |
Assigns array of DWORD to this hw index.
|
|
DllExport const unsigned int | Count () |
Returns the number of indices per element.
|
|
DllExport DWORD & | operator[] (int i) |
Array access to each index. |
|
DllExport const DWORD & | operator[] (int i) const |
DllExport HWIndex32Bit | ( | unsigned int | indicesPerElement | ) |
Constructor.
indicesPerElement | are the number of indices that make up each element. For instance a triangle is 3, a line segment is 2 etc. |
DllExport void SetBuffer | ( | DWORD * | buffer | ) |
Assigns array of DWORD to this hw index.
This lets you assign a buffer to map into DWORD *buffer is the buffer. This will let the HWIndex map into the buffer so you can extract a specific element out of it.
buffer | the array of indices to be mapped |
DllExport const unsigned int Count | ( | ) |
Returns the number of indices per element.
DllExport DWORD& operator[] | ( | int | i | ) |
Array access to each index.
Array access to each index. Out of bounds access <0 || > Count() will default to returning the first index
DllExport const DWORD& operator[] | ( | int | i | ) | const |