This class is used to help with managing 16 bit hardware index buffer.
This class is used to help with managing 16 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 | HWIndex16Bit (unsigned int indicesPerElement) |
Constructor. |
|
DllExport void | SetBuffer (WORD *buffer) |
Assigns array of WORD to this hw index.
|
|
DllExport const unsigned int | Count () |
Returns the number of indices per element.
|
|
DllExport WORD & | operator[] (int i) |
Array access to each index. |
|
DllExport const WORD & | operator[] (int i) const |
DllExport HWIndex16Bit | ( | unsigned int | indicesPerElement | ) |
Constructor.
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 | ( | WORD * | buffer | ) |
Assigns array of WORD to this hw index.
This lets you assign a buffer to map into WORD *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 WORD& 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 WORD& operator[] | ( | int | i | ) | const |