3ds Max C++ API Reference
|
This is a class that lets you create a hw vertex buffer. More...
#include <HWVertex.h>
Public Member Functions | |
DllExport | HWVertexBuffer (DWORD vType) |
Constructor. More... | |
DllExport | ~HWVertexBuffer () |
Destructor. More... | |
DllExport void | FreeBuffer () |
Frees the vertex buffer. More... | |
DllExport void | SetUVWSize (unsigned int id, unsigned int size) |
This sets the size of each UVW channel. More... | |
DllExport void | SetMaxMapChannel (unsigned int hwChannel, int maxMapChannel) |
This lets you associate a HW texture channel with a max map channel. More... | |
DllExport int | GetMaxMapChannel (unsigned int hwChannel) |
This lets get the map channel associated with a hw channel. More... | |
DllExport bool | CreateBuffer (unsigned int numVertice) |
This allocates our buffer. Returns false if the buffer creation failed. More... | |
DllExport unsigned int | GetStride () |
returns the stride in bytes of a hw vertex More... | |
DllExport unsigned int | Size () |
returns the size in bytes of the entire buffer More... | |
DllExport unsigned int | NumberVertices () |
returns the number of hw vertices in the buffer More... | |
DllExport bool | SetNumberVertices (unsigned int ct) |
this lets you set the size of the buffer, More... | |
DllExport HWVertex | GetHWVert (int id) |
This returns a hwvertex of a specific vertex. More... | |
DllExport BYTE * | GetRawBufferPointer () |
returns a raw pointer to the vertex buffer More... | |
DllExport void | SetHasConnectionData (bool hasConnectionData) |
This lets you set whether the vertex buffer will also maintain a connection list back to the original geometry. More... | |
DllExport bool | GetHasConnectionData () |
This returns whether the vertex buffer has connection data back to the original geometry. More... | |
DllExport void | SetConnectionData (unsigned int i, unsigned int oldPosID, int oldNormalID) |
This lets you set the connection data. More... | |
DllExport unsigned int * | GetPositionConnectionList () |
This returns position mapping list. More... | |
DllExport int * | GetNormalConnectionList () |
This returns normal mapping list. 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 is a class that lets you create a hw vertex buffer.
It allows you to define, create, edit and access the buffer
DllExport HWVertexBuffer | ( | DWORD | vType | ) |
Constructor.
[in] | vType | the description of the HW vertex which can be any combination of VertexType |
DllExport ~HWVertexBuffer | ( | ) |
Destructor.
This sets the size of each UVW channel.
By default a UVW channel is 2 point3 a UV. you can change the size to just a U, UV, or UVW with this. This must be set before calling create buffer if you want to change the channel sizes
[in] | id | which channel |
[in] | size | the size of the channel 1 to 3 |
This lets you associate a HW texture channel with a max map channel.
[in] | hwChannel | the hw channel |
[in] | maxMapChannel | the Max channel |
This lets get the map channel associated with a hw channel.
[in] | hwChannel | the hw channel |
This allocates our buffer. Returns false if the buffer creation failed.
[in] | numVertice | is the number of hw vertices to create for this buffer |
this lets you set the size of the buffer,
this lets you set the size of the buffer, it returns true if everything was allocated correctly
/param unsigned int ct the number of vertices to set the buffer count to
This returns a hwvertex of a specific vertex.
[in] | id | is which vertex you want to look at |
DllExport BYTE* GetRawBufferPointer | ( | ) |
returns a raw pointer to the vertex buffer
This lets you set whether the vertex buffer will also maintain a connection list back to the original geometry.
[in] | hasConnectionData | whether the vertex buffer will also build connection info from the max mesh to the HW mesh |
DllExport bool GetHasConnectionData | ( | ) |
This returns whether the vertex buffer has connection data back to the original geometry.
This lets you set the connection data.
This lets you set the connection data. It only tracks position and normals.
[in] | i | this is the index in the hw vertex buffer |
[in] | oldPosID | this is the position index in max mesh vertex list |
[in] | oldNormalID | this is the position index in max mesh gfxnormal list, set this value if you want to use the gfxfacenormal list. This is used when the face has no smoothing group |