Contains all the data needed to move points (and map vertices) as the user drags a chamfer or extrude.
It's created by the topological change that happens at the start
of the chamfer or extrude. The strategy is this: The
chamfer/extrude operation is divided into two parts, the
topological change and a later geometric change. (This works well
for Editable Poly, 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 first initialized to a mesh. Then its data is filled
in by the topological change. This data is used to find
"directions" for all the geometric and mapping vert changes over
the course of the geometric modification.
#include <mnmesh.h>
Public Member Functions |
|
MNChamferData () | |
Constructor. |
|
MNChamferData (const MNMesh &m) | |
Constructor. |
|
DllExport | ~MNChamferData () |
Destructor. |
|
DllExport void | InitToMesh (const MNMesh &m) |
This method sets up the
MNChamferData based on a given mesh, allocating the vertex and
mapping vertex tables as appropriate. |
|
DllExport void | setNumVerts (int nv, bool keep=TRUE, int resizer=0) |
This method allocates the vdir and vmax
tables, and initializes the new members of vmax to 0. |
|
DllExport void | ClearLimits () |
Clears all the vmax limits to -1 (no limit).
|
|
DllExport void | GetDelta (float amount, Tab< Point3 > &delta) |
Uses vectors and limits to obtain the
offsets corresponding to a certain extrude or chamfer amount.
|
|
DllExport bool | GetMapDelta (MNMesh &mm, int mapChannel, float amount, Tab< UVVert > &delta) |
Uses map vectors and limits to obtain the
mapping offsets corresponding to a certain extrude or chamfer
amount. |
|
Tab< UVVert > & | MDir (int mapChannel) |
Data accessor. |
|
Public Attributes |
|
Tab< Point3 > | vdir |
The related direction vectors for mapping
vertices in all active mapping channels. |
|
Tab< float > | vmax |
The maximum amount each vector may be
applied (before vertices start crossing over each other. |
|
Tab< UVVert > * | mdir |
The related direction vectors for mapping
vertices in all active mapping channels. |
MNChamferData | ( | ) | [inline] |
Constructor.
{ mdir=NULL;}
MNChamferData | ( | const MNMesh & | m | ) | [inline] |
Constructor.
This constructor Initializes to the mesh passed (allocates mapping channels, etc.)
{ mdir=NULL; InitToMesh(m);}
DllExport ~MNChamferData | ( | ) |
Destructor.
DllExport void InitToMesh | ( | const MNMesh & | m | ) |
This method sets up the MNChamferData based on a given mesh, allocating the vertex and mapping vertex tables as appropriate.
DllExport void setNumVerts | ( | int | nv, |
bool | keep = TRUE , |
||
int | resizer = 0 |
||
) |
This method allocates the vdir and vmax tables, and initializes the new members of vmax to 0.
(Note: this method can be applied to an existing MNChamferData to reflect an increase in vertices in the MNMesh as topological changes occur.)
DllExport void ClearLimits | ( | ) |
Clears all the vmax limits to -1 (no limit).
Uses vectors and limits to obtain the offsets corresponding to a certain extrude or chamfer amount.
Uses map vectors and limits to obtain the mapping offsets corresponding to a certain extrude or chamfer amount.
Data accessor.
This method returns the appropriate map info. If mp >= 0, it returns the member of the mdir array. If mp < 0, it returns the member of the hmdir array (in keeping with "hidden map channel" indexing conventions).
{ return (mapChannel<0) ? hmdir[-1-mapChannel] : mdir[mapChannel]; }
The related direction vectors for mapping vertices in all active mapping channels.
The maximum amount each vector may be applied (before vertices start crossing over each other.
The related direction vectors for mapping vertices in all active mapping channels.