Public Member Functions | Public Attributes

PatchCapper Class Reference

This reference page is linked to from the following overview topics: Capping a Shape with a Patch.


Search for all occurrences

Detailed Description

See also:
Class PatchCapPoly, Class BezierShape, Class PatchMesh, Working with Shapes and Splines.

Description:
This class is used to apply the PatchCapInfo data to a PatchMesh. It will modify the mesh as required to add the cap. Simply fill in the vertices, vectors and patches bordering the cap, then call the CapPatch method. All methods of this class are implemented by the system.
Data Members:
int numPolys;

The number of polygons.

PatchCapPoly *polys;

A pointer to the PatchCapPoly.

#include <captypes.h>

Inheritance diagram for PatchCapper:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport  PatchCapper (BezierShape &shape)
CoreExport  ~PatchCapper ()
CoreExport PatchCapPoly operator[] (int index)
CoreExport int  CapPatchMesh (PatchMesh &mesh, PatchCapInfo &capInfo, BOOL flip, DWORD smooth, Matrix3 *tm=NULL, int mtlID=-1)

Public Attributes

int  numPolys
PatchCapPoly polys

Constructor & Destructor Documentation

CoreExport PatchCapper ( BezierShape shape )
Remarks:
Constructor.
Parameters:
BezierShape &shape

See Class BezierShape.
CoreExport ~PatchCapper ( )
Remarks:
Destructor.

Member Function Documentation

CoreExport PatchCapPoly& operator[] ( int  index )
Remarks:
Array access operator.
CoreExport int CapPatchMesh ( PatchMesh mesh,
PatchCapInfo capInfo,
BOOL  flip,
DWORD  smooth,
Matrix3 tm = NULL,
int  mtlID = -1 
)
Remarks:
This method is used to modify the mesh based on the PatchCapInfo, the flipped state, the smoothing group and an orientation matrix.
Parameters:
PatchMesh &mesh

The PatchMesh to modify.

PatchCapInfo &capInfo

The PatchCapInfo describing the cap. See Class PatchCapInfo.

BOOL flip

A switch to indicate if the cap should be oriented normally or flipped. The PatchCapInfo is used for both the front and back side of a cap. Either the front or the back will have to be flipped. This switch is used to indicate if a particular one is flipped.

DWORD smooth

The smoothing group for all the faces in the cap.

Matrix3 *tm=NULL

The orientation matrix. A grid cap generates new vertices inside the shape that make up the grid. In the case of a SurfRev for example, the end cap might be rotated, or scaled in some manner. A matrix is required so the capper knows how to orient the vertices into the correct location. This matrix is ignored for non-grid capping.

int mtlID=-1

Specifies the material ID of the patches that make up the cap. The default for this value is -1, which causes the capper to use material ID 0 for non-flipped caps and ID 1 for flipped caps. Note that these ID values are zero-based, while the UI display is 1-based.
Returns:
Nonzero if the mesh was modified; otherwise zero.
Operators:

Member Data Documentation

int numPolys

PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper
PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper PatchCapper