Public Member Functions | Public Attributes

MeshChamferData Class Reference

Search for all occurrences

Detailed Description

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

Description:
This class is available in release 3.0 and later only.

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.)

#include <meshadj.h>

Inheritance diagram for MeshChamferData:
Inheritance graph
[legend]

List of all members.

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< Point3 vdir
Tab< float >  vmax
Tab< UVVert > *  mdir

Constructor & Destructor Documentation

MeshChamferData ( ) [inline]
Remarks:
Constructor. This sets mdir to NULL.
{ mdir=NULL; }
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.
{ mdir=NULL; InitToMesh(m); }
DllExport ~MeshChamferData ( )
Remarks:
Destructor. If mdir is allocted it is seleted.

Member Function Documentation

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.
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.

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

Member Data Documentation

Tab<float> vmax

MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData
MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData MeshChamferData