3ds Max C++ API Reference
HWTupleMeshContainer Class Reference

This is a container class of our sub meshes. More...

#include <HWMesh.h>

+ Inheritance diagram for HWTupleMeshContainer:

Public Member Functions

DllExport HWTupleMeshContainer ()
 Constructor
More...
 
DllExport ~HWTupleMeshContainer ()
 Destructor. More...
 
DllExport void FreeMeshes ()
 This frees all the sub meshes and sets the sub mesh count to 0. More...
 
DllExport unsigned int Count ()
 Returns the number of sub meshes. More...
 
DllExport GFX_MESH::HWTupleMeshGet (unsigned int id)
 Returns a specific sub mesh. More...
 
DllExport void Append (GFX_MESH::HWTupleMesh *hwMesh)
 Appends a sub mesh to the list. More...
 
DllExport void Draw (GraphicsWindow *gw, DWORD attribute)
 Draws all meshes that match the attribute. More...
 
DllExport void UpdateVertexBuffer (Point3 *vertexList, Point3 *gfxNormalList, Point3 *faceNormalList, BitArray &changedVerts, int count, unsigned int *vertMapList, int *normalsMapList)
 Lets you update the vertex buffers. More...
 
DllExport void Release ()
 Releases this class pointer
More...
 
- Public Member Functions inherited from IHWDrawMesh
DllExport IHWDrawMesh ()
 Constructor. More...
 
virtual ~IHWDrawMesh ()
 
DllExport void MakeRef ()
 When ever you reference this pointer and want to hang onto it you need to call this. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator 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 voidoperator 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 voidoperator 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 voidoperator 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 voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_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...
 
- Protected Member Functions inherited from IHWDrawMesh
DllExport void DecRefCount ()
 You should not typically call this but should call release when you are done with the pointer

. More...
 
DllExport bool CanDelete ()
 returns whether the class can be deleted ie the ref count is zero More...
 
- Protected Attributes inherited from IHWDrawMesh
int mRefCount
 

Detailed Description

This is a container class of our sub meshes.

This class is a container for all our sub mesh. We separate each mesh by matid and vertex buffer size

Constructor & Destructor Documentation

◆ HWTupleMeshContainer()

◆ ~HWTupleMeshContainer()

Destructor.

Member Function Documentation

◆ FreeMeshes()

DllExport void FreeMeshes ( )

This frees all the sub meshes and sets the sub mesh count to 0.

◆ Count()

DllExport unsigned int Count ( )

Returns the number of sub meshes.

◆ Get()

DllExport GFX_MESH::HWTupleMesh* Get ( unsigned int  id)

Returns a specific sub mesh.

◆ Append()

DllExport void Append ( GFX_MESH::HWTupleMesh hwMesh)

Appends a sub mesh to the list.

The container will manage the life of the pointer

Parameters
hwMeshis the mesh to append to the end of the list

◆ Draw()

DllExport void Draw ( GraphicsWindow gw,
DWORD  attribute 
)
virtual

Draws all meshes that match the attribute.

Parameters
gwthe graphics window to draw to
attributethe mat id to check

Implements IHWDrawMesh.

◆ UpdateVertexBuffer()

DllExport void UpdateVertexBuffer ( Point3 vertexList,
Point3 gfxNormalList,
Point3 faceNormalList,
BitArray changedVerts,
int  count,
unsigned int vertMapList,
int normalsMapList 
)
virtual

Lets you update the vertex buffers.

Allows you to change the position and normals of the mesh without recreating the hw mesh

Parameters
vertexListThis is a pointer of all the vertices on the mesh
gfxNormalListThis is a pointer of all the gfx normals on the mesh
faceNormalListThis is a pointer of all the face normals on the mesh
changedVertsThis is a bitarray of all the changed verts
countThis is number of vertices in vertex List
vertMapListThis is mapping that lets the HW vertex look up which vertex it belongs to
normalsMapListThis is mapping that lets the HW vertex look up which normal it belongs to. If this value is negative it is made positive and then face normallist is used to lookup the normal
This occurs when there is no smoothing group.

Implements IHWDrawMesh.

◆ Release()

DllExport void Release ( )
virtual

Releases this class pointer

Implements IHWDrawMesh.