Public Member Functions | Public Attributes | Friends

MNMapFace Class Reference

Search for all occurrences

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.

#include <mnmesh.h>

Inheritance diagram for MNMapFace:
Inheritance graph
[legend]

List of all members.

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, but does not actually set 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 MNMapFace operator= (const MNMapFace &from)
  Assignment operator.
DllExport MNMapFace operator= (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).
int *  tv
  Mapping vertices used by this mapping face.

Friends

class  MNMesh

Constructor & Destructor Documentation

MNMapFace ( ) [inline]

Constructor.

Calls Init().

{ Init(); }
DllExport MNMapFace ( int  d )

Constructor.

Sets the degree and hidden vertex count.

Parameters:
int d

Desired degree.
~MNMapFace ( ) [inline]

Destructor.

Calls Clear().

{ Clear(); }

Member Function Documentation

DllExport void Init ( )

Initializes MNMapFace.

deg is set to 0, pointers set to NULL.

DllExport void Clear ( )
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.
void SetSize ( int  d ) [inline]

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

{ SetAlloc(d); deg=d; }
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.
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.
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.
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.
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.

Parameters:
int vv

The vertex whose index is returned.
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.
DllExport MNMapFace& operator= ( const MNMapFace from )

Assignment operator.

DllExport MNMapFace& operator= ( const MNFace from )

Assignment operator.

DllExport bool operator== ( const MNMapFace from )

Assignment operator.

DllExport void MNDebugPrint ( )

Debug print statement.


Friends And Related Function Documentation

friend class MNMesh [friend]

Member Data Documentation

int deg

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

Must match degree of related MNFace in MNMesh.

int* tv

Mapping vertices used by this mapping face.

This array has size MNMapFace::deg


MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace
MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace MNMapFace