HWIndex16Bit Class Reference


Detailed Description

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>

Inheritance diagram for HWIndex16Bit:
Inheritance graph
[legend]

List of all members.

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

Constructor & Destructor Documentation

DllExport HWIndex16Bit ( unsigned int  indicesPerElement )

Constructor.

Constructor

Parameters:
indicesPerElement are the number of indices that make up each element. For instance a triangle is 3, a line segment is 2 etc.

Member Function Documentation

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.

Parameters:
buffer the array of indices to be mapped
DllExport const unsigned int Count ( )

Returns the number of indices per element.

Returns:
This returns the number of indices per element. For instance a triangle would return 3 a line list 2
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

Returns:
The index value
DllExport const WORD& operator[] ( int  i ) const

HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit
HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit HWIndex16Bit