3ds Max C++ API Reference
|
This class is our hw index buffer representation.
More...
#include <HWIndex.h>
Public Member Functions | |
DllExport | HWIndexBuffer (unsigned int count, unsigned int indicesPerPrimitive, bool use16Bit) |
Constructor. More... | |
DllExport | ~HWIndexBuffer () |
Destructor. More... | |
DllExport void | FreeBuffer () |
This frees all our index buffers. More... | |
DllExport const unsigned int | NumberPrimitives () |
returns the number of primitives in the index buffer More... | |
DllExport const unsigned int | IndicesPerPrimitive () |
Returns the number of indices per primitive. More... | |
DllExport const unsigned int | Size () |
The size of the buffer in bytes. More... | |
DllExport bool | SetNumberPrimitives (unsigned int ct) |
This lets you reset the number of primitives. More... | |
DllExport bool | Is16Bit () |
This returns whether the buffers are 16 or 32 bit. More... | |
DllExport HWIndex32Bit | GetHWIndex32Bit (int index) |
Returns a particular 32 bit HWIndex. More... | |
DllExport HWIndex16Bit | GetHWIndex16Bit (int index) |
Returns a particular 16 bit HWIndex. More... | |
DllExport const DWORD * | GetRawBufferPointer () |
Returns the raw pointer to the 32 but buffer. More... | |
DllExport const WORD * | GetRawBufferPointer16Bit () |
Returns the raw pointer to the 16 bit buffer. More... | |
Additional Inherited Members | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. More... | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. More... | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. More... | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. More... | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. More... | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More... | |
This class is our hw index buffer representation.
This class is our hw index buffer representation. It is just basically a list of DWORDs or WORDs and a description of the number of indices per element.
DllExport HWIndexBuffer | ( | unsigned int | count, |
unsigned int | indicesPerPrimitive, | ||
bool | use16Bit | ||
) |
Constructor.
HWIndexBuffer(unsigned int count, unsigned int indicesPerPrimitive, bool use16Bit) Constructor
count | - this is the number of primitives for this buffer to be allocated |
indicesPerPrimitive | - this is the number of indices per primitive |
use16Bit | - this is whether to use 16 bit buffers for the indices |
DllExport ~HWIndexBuffer | ( | ) |
Destructor.
This frees all our index buffers.
This frees all our index buffers and resets the count to 0
returns the number of primitives in the index buffer
Returns the number of indices per primitive.
The size of the buffer in bytes.
This lets you reset the number of primitives.
This lets you reset the number of primitives in the list it will keep the original data. It will returns true if successful.
ct | is the new size for the buffer |
DllExport bool Is16Bit | ( | ) |
This returns whether the buffers are 16 or 32 bit.
DllExport HWIndex32Bit GetHWIndex32Bit | ( | int | index | ) |
Returns a particular 32 bit HWIndex.
Returns a particular 32 bit HWIndex. This is useful if you dont want to look up the offsets by hand /param int index - the index of that you want
DllExport HWIndex16Bit GetHWIndex16Bit | ( | int | index | ) |
Returns a particular 16 bit HWIndex.
Returns a particular 16 bit HWIndex. This is useful if you dont want to look up the offsets by hand /param int index - the index of that you want
DllExport const DWORD* GetRawBufferPointer | ( | ) |
Returns the raw pointer to the 32 but buffer.
DllExport const WORD* GetRawBufferPointer16Bit | ( | ) |
Returns the raw pointer to the 16 bit buffer.