3ds Max C++ API Reference
Loading...
Searching...
No Matches
MNMapFace Class Reference

Used to store map vertex information for a given face and map channel. More...

#include <mnmesh.h>

+ Inheritance diagram for MNMapFace:

Public Member Functions

 MNMapFace ()
 Constructor.
 
DllExport MNMapFace (int d)
 Constructor.
 
 ~MNMapFace ()
 Destructor.
 
DllExport void Init ()
 Initializes MNMapFace.
 
DllExport void Clear ()
 Clears and frees MNMapFace.
 
DllExport void SetAlloc (int d)
 Allocates enough memory in the arrays for the face to have degree d, but does not actually set the degree.
 
void SetSize (int d)
 Allocates enough memory in the arrays for the face to have degree d, and then sets the degree.
 
DllExport void MakePoly (int fdeg, int *tt)
 Makes this face into a polygon with the specified vertices and other information.
 
DllExport void Insert (int pos, int num=1)
 Inserts space for more vertices at the specified position.
 
DllExport void Delete (int pos, int num=1)
 Deletes vertices from this map face.
 
DllExport void RotateStart (int newstart)
 Re-indexes the vertices and edges so that the vertex in position newstart becomes the new first vertex.
 
DllExport void Flip ()
 Reverses order of verts, effectively inverting the face.
 
DllExport int VertIndex (int vv)
 Returns the position of vertex vv in this face's list of vertices.
 
DllExport void ReplaceVert (int ov, int nv)
 Replaces vertex ov with vertex nv in the list of vertices.
 
DllExport MNMapFaceoperator= (const MNMapFace &from)
 Assignment operator.
 
DllExport MNMapFaceoperator= (const MNFace &from)
 Assignment operator.
 
DllExport bool operator== (const MNMapFace &from)
 Assignment operator.
 
DllExport void MNDebugPrint ()
 Debug print statement.
 

Public Attributes

int deg
 Degree of this face, and size of the arry of mapping vertices (MNMapFace::tv).
 
inttv
 Mapping vertices used by this mapping face.
 

Friends

class MNMesh
 

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

Used to store map vertex information for a given face and map channel.


By way of analogy: MNMapFace is to MNFace as TVFace is to Face. MNMapFace is to MNMap as MNFace is to MNMesh as TVFace is to MeshMap as Face is to Mesh.

See also
MNMesh, MNMap.

Constructor & Destructor Documentation

◆ MNMapFace() [1/2]

MNMapFace ( )
inline

Constructor.

Calls Init().

467{ Init(); }
DllExport void Init()
Initializes MNMapFace.

◆ MNMapFace() [2/2]

Constructor.

Sets the degree and hidden vertex count.

Parameters:
int d

Desired degree.

◆ ~MNMapFace()

~MNMapFace ( )
inline

Destructor.

Calls Clear().

476{ Clear(); }
DllExport void Clear()
Clears and frees MNMapFace.

Member Function Documentation

◆ Init()

DllExport void Init ( )

Initializes MNMapFace.

deg is set to 0, pointers set to NULL.

◆ Clear()

DllExport void Clear ( )

Clears and frees MNMapFace.

◆ SetAlloc()

DllExport void SetAlloc ( int  d)

Allocates enough memory in the arrays for the face to have degree d, but does not actually set the degree.

If the arrays are already large enough (or larger), it does not reallocate them.

Parameters:
int d

The degree for this map face.

◆ SetSize()

void SetSize ( int  d)
inline

Allocates enough memory in the arrays for the face to have degree d, and then sets the degree.

If the arrays are already large enough (or larger), it does not reallocate them. You generally don't need to use this method separately; MakePoly, Insert, and other methods which may require additional memory will call this if needed.

498{ SetAlloc(d); deg=d; }
int deg
Degree of this face, and size of the arry of mapping vertices (MNMapFace::tv).
Definition: mnmesh.h:461
DllExport void SetAlloc(int d)
Allocates enough memory in the arrays for the face to have degree d, but does not actually set the de...

◆ MakePoly()

DllExport void MakePoly ( int  fdeg,
int tt 
)

Makes this face into a polygon with the specified vertices and other information.

Parameters:
int fdeg

The degree to set this face to.

int *tt

The list of vertices for this face.

◆ Insert()

DllExport void Insert ( int  pos,
int  num = 1 
)

Inserts space for more vertices at the specified position.

Parameters:
int pos

The location within the map face where the new vertices should be added.

int num=1

The number of new vertices to add.

◆ Delete()

DllExport void Delete ( int  pos,
int  num = 1 
)

Deletes vertices from this map face.

Parameters:
The location within the map face where the vertices should be deleted.

int num=1

The number of vertices to delete.

◆ RotateStart()

DllExport void RotateStart ( int  newstart)

Re-indexes the vertices and edges so that the vertex in position newstart becomes the new first vertex.

Triangulation is also corrected.

Parameters:
int newstart

The new first vertex.

◆ Flip()

DllExport void Flip ( )

Reverses order of verts, effectively inverting the face.

◆ VertIndex()

DllExport int VertIndex ( int  vv)

Returns the position of vertex vv in this face's list of vertices.

Parameters:
int vv

The vertex whose index is returned.

◆ ReplaceVert()

DllExport void ReplaceVert ( int  ov,
int  nv 
)

Replaces vertex ov with vertex nv in the list of vertices.

Parameters:
int ov

The vertex to replace.

int nv

The vertex to replace it with.

◆ operator=() [1/2]

DllExport MNMapFace & operator= ( const MNMapFace from)

Assignment operator.

◆ operator=() [2/2]

DllExport MNMapFace & operator= ( const MNFace from)

Assignment operator.

◆ operator==()

DllExport bool operator== ( const MNMapFace from)

Assignment operator.

◆ MNDebugPrint()

DllExport void MNDebugPrint ( )

Debug print statement.

Friends And Related Function Documentation

◆ MNMesh

friend class MNMesh
friend

Member Data Documentation

◆ deg

int deg

Degree of this face, and size of the arry of mapping vertices (MNMapFace::tv).

Must match degree of related MNFace in MNMesh.

◆ tv

int* tv

Mapping vertices used by this mapping face.

This array has size MNMapFace::deg