Public Member Functions | Public Attributes

PatchVec Class Reference

Search for all occurrences

Detailed Description

See also:
Class PatchMesh, Working with Patches.

Description:
This class represents a patch vector. This can be either an interior vector or an edge vector. All methods of this class are implemented by the system.
Data Members:
Point3 p;

The vertex location.

int vert;

The vertex which owns this vector.

IntTab patches;

These are the patches that share this vector. If the edge is open there will only be one patch. In this case patches[0] will be used and patches[1] will be -1. Note: As of R4.0 the previous array of [2] has been replaced with the IntTab because vectors can now be used by more than two patches.

DWORD flags;

The patch vector flag:

PVEC_INTERIOR

This indicates the vector is an interior vector. These are the three vectors inside a tri patch or the four inside a quad patch.

int aux1;

This data member is available in release 3.0 and later only.

Used to track topology changes during editing (Edit Patch).

int aux2;

This data member is available in release 3.0 and later only.

Used to track topology changes during editing (PatchMesh).

#include <patch.h>

Inheritance diagram for PatchVec:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport  PatchVec ()
CoreExport  PatchVec (PatchVec &from)
void  ResetData ()
CoreExport BOOL  AddPatch (int index)
CoreExport PatchVec operator= (PatchVec &from)
void  Transform (Matrix3 &tm)
CoreExport IOResult  Save (ISave *isave)
CoreExport IOResult  Load (ILoad *iload)

Public Attributes

Point3  p
int  vert
IntTab  patches
DWORD  flags
int  aux1
int  aux2

Constructor & Destructor Documentation

CoreExport PatchVec ( )
Remarks:
Constructor. The location is set to 0,0,0. The vertex owner is set to undefined. The patches using the vector is set to undefined. The flags are set to 0.
CoreExport PatchVec ( PatchVec from )
Remarks:
Constructor. The data members are initialized to those of the from patch vector.
Parameters:
PatchVec &from

The vector to copy from.

Member Function Documentation

void ResetData ( ) [inline]
Remarks:
Resets the data members. The vertex owner is set to undefined. The patches using the vector is set to undefined.
{ vert = PATCH_UNDEFINED; patches.Delete(0,patches.Count());}
CoreExport BOOL AddPatch ( int  index )
Remarks:
Adds the specified patch to this vector table.
Parameters:
int index

The index in the PatchMesh class patches table (patches) of the patch to add.
Returns:
Returns TRUE if the patch was added; otherwise FALSE.
CoreExport PatchVec& operator= ( PatchVec from )
Remarks:
Assignment operator.
Parameters:
PatchVec& from

The patch vector to copy from.
void Transform ( Matrix3 tm ) [inline]
Remarks:
This method is available in release 3.0 and later only.

Transforms the vertex location p by the specified matrix.
Parameters:
Matrix3 &tm

The matrix to transform the vertex.
{ p = p * tm; }
CoreExport IOResult Save ( ISave isave )
Remarks:
This is used internally to save the data to the .MAX file.
CoreExport IOResult Load ( ILoad iload )
Remarks:
This is used internally to load the data from the .MAX file.
Operators:

Member Data Documentation

int vert
DWORD flags
int aux1
int aux2

PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec
PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec PatchVec