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

#include <meshadj.h>

+ Inheritance diagram for MeshChamferData:

Public Member Functions

 MeshChamferData ()
 
 MeshChamferData (const Mesh &m)
 
DllExport ~MeshChamferData ()
 
DllExport void InitToMesh (const Mesh &m)
 
DllExport void setNumVerts (int nv, bool keep=TRUE, int resizer=0)
 
Tab< UVVert > & MDir (int mp)
 

Public Attributes

Tab< Point3vdir
 
Tab< float > vmax
 
Tab< UVVert > * mdir
 

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

See also
Class Mesh, Class MeshDelta, Template Class Tab.

Description:
This class contains all the data needed to move points as the user drags a chamfer. It's created by the topological change that happens at the start of the chamfer. It is used to maintain chamfer information between several MeshDelta methods. The strategy is this: The chamfer operation is divided into two parts, the topological change and a later geometric change. (This works well for EditableMesh, where the topology change is completed first, then apply a series of geometry changes as the user spins a spinner or drags a mouse. Each geometry change is undone before the next is applied, but the topology change only happens once.)

This class is filled in by the topological change with the "directions" for all the geometric and mapping vert changes:
Data Members:
Tab<Point3> vdir;

This table contains the directions of movement for each vertex, scaled in such a manner to produce a consistent chamfer.

Tab<float> vmax;

This table contains the limits of motion for each vertex - stopping the vertices at these limits will prevent them from crossing each other or over far edges.

Tab<UVVert> *mdir;

For each active map channel mp, mdir[mp] represents the directions of movement of the map verts for that channel. (Map verts need to be moved as well, otherwise the maps get distorted.)

Constructor & Destructor Documentation

◆ MeshChamferData() [1/2]

MeshChamferData ( )
inline
Remarks
Constructor. This sets mdir to NULL.
575{ mdir=NULL; }
#define NULL
Definition: autoptr.h:18
Tab< UVVert > * mdir
Definition: meshadj.h:572

◆ MeshChamferData() [2/2]

MeshChamferData ( const Mesh m)
inline
Remarks
Constructor.
Parameters:
const Mesh &m

The mesh to init this MeshChamferData object from, allocating the vertex and mapping vertex tables as appropriate.
581{ mdir=NULL; InitToMesh(m); }
DllExport void InitToMesh(const Mesh &m)

◆ ~MeshChamferData()

Remarks
Destructor. If mdir is allocted it is seleted.

Member Function Documentation

◆ InitToMesh()

DllExport void InitToMesh ( const Mesh m)
Remarks
This method sets up a MeshChamferData based on a given mesh, allocating the vertex and mapping vertex tables as appropriate.
Parameters:
const Mesh &m

The Mesh to init from.

◆ setNumVerts()

DllExport void setNumVerts ( int  nv,
bool  keep = TRUE,
int  resizer = 0 
)
Remarks
This method simply allocates the vdir and vmax tables, and initializes the new members of vmax to 0. This method can be applied to an existing MeshChamferData to reflect an increase in vertices by VClone or VCreate operations.
Parameters:
int nv

The number of verts

bool keep=TRUE

TRUE to keep if resized; FALSE to discard.

int resizer=0

The number of elements the vdir and vmax tables are resized beyond their current size.

◆ MDir()

Tab< UVVert > & MDir ( int  mp)
inline
605{ return (mp<0) ? hmdir[-1-mp] : mdir[mp]; }

Member Data Documentation

◆ vdir

Tab<Point3> vdir

◆ vmax

Tab<float> vmax

◆ mdir

Tab<UVVert>* mdir