PatchMesh Class Reference

#include <patch.h>

Class Description

See also
Class Patch, Class PatchVec, Class PatchEdge, Class PatchVert, Class BitArray, Class TessApprox, Class PatchTVert, Patches and Faces.

Description:
A patch mesh can be made up of any number of patches. Each of these patches can be three or four sided. Each edge of a patch can only be used by either one patch (which makes it an open edge) or two patches (which makes it a transitional edge between the two).

All methods of this class are implemented by the system.
Topology:
int numVerts;

The number of vertices.

int numVecs;

The number of vectors.

int numPatches;

The number of patches.

int numEdges;

The number of edges.

Patch *patches;

The list of patches.

PatchVec *vecs;

The list of PatchVecs.

PatchEdge *edges;

The list of PatchEdges.

Tab<HookPoint> hooks;

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

This table is used internally
Geometry:
PatchVert *verts;

The list of PatchVerts.
Texture Coordinate Assignment:
Tab<int> numTVerts;

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

A table containing the number of texture vertices for each channel.

Tab<PatchTVert *> tVerts;

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

A table containing pointers to the texture vertices for each channel.

Previous to R4.0 this was a Tab<UVVert *>.

Tab<TVPatch *> tvPatches;

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

A table containing pointers to the texture vertex patches for each channel.
Material Assignment:
DWORD mtlIndex;

The object level material.
Selection:
BitArray vertSel;

The selected vertices.

BitArray edgeSel;

The selected edges.

BitArray patchSel;

The selected patches.

int bezVecVert;

This is used internally.

DWORD dispFlags;

The display attribute flags. See Patch Flags.

DWORD selLevel;

The current selection level. One of the following values:

PATCH_OBJECT - Object level.

PATCH_VERTEX - Vertex level.

PATCH_PATCH - Patch level.

PATCH_EDGE - Edge level.

int cacheSteps;

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

The meshSteps used for the cache.

BOOL cacheAdaptive;

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

The adaptive switch used for the mesh cache.

Tab<Point3> extrudeDeltas;

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

This data member is for internal use only.

Tab<ExtrudeData> extrudeData;

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

This data member is for internal use only.

BitArray bevelEdges;

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

This data member is for internal use only.

Tab<float> edgeDistances;

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

This data member is for internal use only.
+ Inheritance diagram for PatchMesh:

Public Member Functions

CoreExport int HookFixTopology ()
 
CoreExport PatchMesh ()
 
CoreExport PatchMesh (PatchMesh &fromPatch)
 
CoreExport void Init ()
 
CoreExport ~PatchMesh ()
 
CoreExport PatchMeshoperator= (PatchMesh &fromPatchMesh)
 
CoreExport PatchMeshoperator= (Mesh &fromMesh)
 
CoreExport void CopyPatchDataFrom (PatchMesh &fromPatchMesh)
 
PRVertexgetRVec (int i)
 
PRVertexgetRVecPtr (int i)
 
CoreExport TVPatchmapPatches (int mp) const
 
CoreExport MtlID getPatchMtlIndex (int i)
 
CoreExport void setPatchMtlIndex (int i, MtlID id)
 
CoreExport BOOL buildLinkages (int patch=-1)
 
CoreExport void computeInteriors ()
 
CoreExport void computeAux ()
 
CoreExport void ApplyConstraints (BOOL selOnly=FALSE)
 
int GetEdge (int v1, int v12, int v21, int v2, int p)
 
CoreExport Tab< intGetEdge (int v1, int v2) const
 
CoreExport Tab< intGetPatches (int v1, int v2) const
 
CoreExport Tab< intGetPatches (int vert) const
 
CoreExport Tab< intGetEdges (int vert) const
 
CoreExport Tab< intGetVectors (int vert) const
 
CoreExport BOOL WeldEdges ()
 
CoreExport void ClonePatchParts (BitArray *patches=NULL)
 
CoreExport void CreateExtrusion (int type=PATCH_PATCH, BOOL edgeClone=FALSE)
 
CoreExport void Attach (PatchMesh *attPatch, int mtlOffset)
 
CoreExport void ChangePatchInterior (int index, int type)
 
CoreExport void ChangeVertType (int index, int type)
 
CoreExport BOOL SelVertsSameType ()
 
CoreExport BOOL SelPatchesSameType ()
 
CoreExport BOOL ResetVertexTangents (int index)
 
CoreExport BOOL ResetVertexTangents (bool useSel=true, const BitArray *vSel=NULL)
 
CoreExport BOOL PatchSmoothVector (bool useSel=true, const BitArray *vSel=NULL)
 
CoreExport BOOL PatchSmoothVertex (bool useSel=true, const BitArray *vSel=NULL)
 
CoreExport BOOL PatchSmoothEdge (bool useSel=true, const BitArray *eSel=NULL)
 
CoreExport BOOL PatchSmoothPatch (bool useSel=true, const BitArray *pSel=NULL)
 
CoreExport void ShrinkSelection (int type)
 
CoreExport void GrowSelection (int type)
 
CoreExport void SelectEdgeRing (BitArray &eSel)
 
CoreExport void SelectEdgeLoop (BitArray &eSel)
 
CoreExport void Dump ()
 
CoreExport void PrepareMesh ()
 
CoreExport void PrepareUnrelaxedMesh ()
 
CoreExport MeshGetMesh ()
 
CoreExport MeshGetUnrelaxedMesh ()
 
CoreExport int IntersectRay (Ray &ray, float &at, Point3 &norm)
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 
CoreExport void AutoSmooth (float angle, BOOL useSel, BOOL preventIndirectSmoothing)
 
CoreExport BOOL SingleEdgesOnly ()
 
CoreExport BitArrayGetElement (int index)
 
CoreExport BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void SetVertexWeightCount (int i)
 
CoreExport void SetVertexWeight (int i, float w)
 
CoreExport float VertexWeight (int i)
 
CoreExport bool VertexWeightSupport ()
 
CoreExport int VertexWeightSelectLevel ()
 
CoreExport int UseEdgeDists ()
 
CoreExport void SetUseEdgeDists (int edgeDist)
 
CoreExport int EdgeDist ()
 
CoreExport void SetEdgeDist (int edgeDist)
 
CoreExport int UseSoftSelections ()
 
CoreExport void SetUseSoftSelections (int useSoftSelections)
 
CoreExport int AffectBackface ()
 
CoreExport void SetAffectBackface (int affectBackface)
 
CoreExport float Falloff ()
 
CoreExport void SetFalloff (float falloff)
 
CoreExport float Pinch ()
 
CoreExport void SetPinch (float pinch)
 
CoreExport float Bubble ()
 
CoreExport void SetBubble (float bubble)
 
CoreExport void InvalidateVertexWeights ()
 
CoreExport void UpdateVertexDists ()
 
CoreExport void UpdateEdgeDists ()
 
CoreExport void UpdateVertexWeights ()
 
CoreExport Point3 VertexNormal (int vIndex)
 
CoreExport BOOL Relaxing ()
 
CoreExport BOOL SetRelax (BOOL v)
 
CoreExport BOOL SetRelaxViewports (BOOL v)
 
CoreExport BOOL SetRelaxValue (float v)
 
CoreExport BOOL SetRelaxIter (int v)
 
CoreExport BOOL SetRelaxBoundary (BOOL v)
 
CoreExport BOOL SetRelaxSaddle (BOOL v)
 
CoreExport BOOL GetRelax ()
 
CoreExport BOOL GetRelaxViewports ()
 
CoreExport float GetRelaxValue ()
 
CoreExport int GetRelaxIter ()
 
CoreExport BOOL GetRelaxBoundary ()
 
CoreExport BOOL GetRelaxSaddle ()
 
Vert Access
 
CoreExport BOOL setNumVerts (int ct, BOOL keep=FALSE)
 
int getNumVerts (void)
 
void setVert (int i, const Point3 &xyz)
 
void setVert (int i, float x, float y, float z)
 
PatchVertgetVert (int i)
 
PatchVertgetVertPtr (int i)
 
Vector Access
CoreExport BOOL setNumVecs (int ct, BOOL keep=FALSE)
 
int getNumVecs (void)
 
void setVec (int i, const Point3 &xyz)
 
void setVec (int i, float x, float y, float z)
 
PatchVecgetVec (int i)
 
PatchVecgetVecPtr (int i)
 
Patch Access
 
CoreExport BOOL setNumPatches (int ct, BOOL keep=FALSE)
 
int getNumPatches (void)
 
Edge Access
CoreExport BOOL setNumEdges (int ct, BOOL keep=FALSE)
 
int getNumEdges (void)
 
RVert Access
 
PRVertexgetRVert (int i)
 
PRVertexgetRVertPtr (int i)
 
TVert Access
 
BOOL setNumTVertsChannel (int mp, int ct, BOOL keep=FALSE)
 
BOOL setNumTVerts (int ct, BOOL keep=FALSE)
 
int getNumTVertsChannel (int mp) const
 
int getNumTVerts () const
 
CoreExport BOOL setNumMapVerts (int mp, int ct, BOOL keep=FALSE)
 
CoreExport int getNumMapVerts (int mp) const
 
CoreExport PatchTVertmapVerts (int mp) const
 
void setTVertChannel (int channel, int i, const UVVert &xyz)
 
void setTVert (int i, const UVVert &xyz)
 
void setTVertChannel (int channel, int i, float x, float y, float z)
 
void setTVert (int i, float x, float y, float z)
 
void setTVPatchChannel (int channel, int i, TVPatch &tvp)
 
void setTVPatch (int i, TVPatch &tvp)
 
PatchTVertgetTVertChannel (int channel, int i)
 
PatchTVertgetTVert (int i)
 
PatchTVertgetTVertPtrChannel (int channel, int i)
 
PatchTVertgetTVertPtr (int i)
 
TVPatch Access
 
BOOL setNumTVPatchesChannel (int channel, int ct, BOOL keep=FALSE, int oldCt=0)
 
BOOL setNumTVPatches (int ct, BOOL keep=FALSE, int oldCt=0)
 
CoreExport BOOL setNumMapPatches (int channel, int ct, BOOL keep=FALSE, int oldCt=0)
 
TVPatchgetTVPatchChannel (int channel, int i)
 
TVPatchgetTVPatch (int i)
 
MapVert Access
 
void setMapVert (int mp, int i, const UVVert &xyz)
 
void setMapVert (int mp, int i, float x, float y, float z)
 
void setMapPatch (int mp, int i, const TVPatch &tvp)
 
PatchTVertgetMapVert (int mp, int i)
 
PatchTVertgetMapVertPtr (int mp, int i)
 
TVPatchgetMapPatch (int mp, int i)
 
Render/Snap/Hit Test
 
CoreExport void render (GraphicsWindow *gw, Material *ma, RECT *rp, int compFlags, int numMat=1)
 
CoreExport BOOL select (GraphicsWindow *gw, Material *ma, HitRegion *hr, int abortOnHit=FALSE, int numMat=1)
 
CoreExport void snap (GraphicsWindow *gw, SnapInfo *snap, IPoint2 *p, Matrix3 &tm)
 
CoreExport BOOL SubObjectHitTest (GraphicsWindow *gw, Material *ma, HitRegion *hr, DWORD vflags, SubPatchHitList &hitList, int numMat=1)
 
Bounding Box Methods
 
CoreExport void renderGizmo (GraphicsWindow *gw)
 
CoreExport void buildBoundingBox (void)
 
CoreExport Box3 getBoundingBox (Matrix3 *tm=NULL)
 
CoreExport void GetDeformBBox (Box3 &box, Matrix3 *tm=NULL, BOOL useSel=FALSE)
 
Data Flow Evaluation
CoreExport void InvalidateGeomCache ()
 
CoreExport void InvalidateMesh ()
 
CoreExport void InvalidateRelaxedMesh ()
 
CoreExport void FreeAll ()
 
CoreExport void ShallowCopy (PatchMesh *amesh, ChannelMask channels)
 
CoreExport void DeepCopy (PatchMesh *amesh, ChannelMask channels)
 
CoreExport void NewAndCopyChannels (ChannelMask channels)
 
CoreExport void FreeChannels (ChannelMask channels, int zeroOthers=1)
 
Display Flags Access
 
void SetDispFlag (DWORD f)
 
DWORD GetDispFlag (DWORD f)
 
void ClearDispFlag (DWORD f)
 
Selection Access
BitArrayVecSel ()
 
BitArrayVertSel ()
 
BitArrayEdgeSel ()
 
BitArrayPatchSel ()
 
CoreExport BitArray VertexTempSel ()
 
Tri/Quad Patch Creation
CoreExport BOOL MakeQuadPatch (int index, int va, int vab, int vba, int vb, int vbc, int vcb, int vc, int vcd, int vdc, int vd, int vda, int vad, int i1, int i2, int i3, int i4, DWORD sm)
 
CoreExport BOOL MakeTriPatch (int index, int va, int vab, int vba, int vb, int vbc, int vcb, int vc, int vca, int vac, int i1, int i2, int i3, DWORD sm)
 
Get/Set Mesh Steps and Adaptive Switch/TessApprox
 
CoreExport void SetMeshSteps (int steps)
 
CoreExport int GetMeshSteps ()
 
CoreExport void SetMeshStepsRender (int steps)
 
CoreExport int GetMeshStepsRender ()
 
CoreExport void SetShowInterior (BOOL si)
 
CoreExport BOOL GetShowInterior ()
 
CoreExport void SetUsePatchNormals (BOOL usePatchNorm)
 
CoreExport BOOL GetUsePatchNormals ()
 
CoreExport void SetAdaptive (BOOL sw)
 
CoreExport BOOL GetAdaptive ()
 
CoreExport void SetViewTess (TessApprox tess)
 
CoreExport TessApprox GetViewTess ()
 
CoreExport void SetProdTess (TessApprox tess)
 
CoreExport TessApprox GetProdTess ()
 
CoreExport void SetDispTess (TessApprox tess)
 
CoreExport TessApprox GetDispTess ()
 
CoreExport BOOL GetViewTessNormals ()
 
CoreExport void SetViewTessNormals (BOOL use)
 
CoreExport BOOL GetProdTessNormals ()
 
CoreExport void SetProdTessNormals (BOOL use)
 
CoreExport BOOL GetViewTessWeld ()
 
CoreExport void SetViewTessWeld (BOOL weld)
 
CoreExport BOOL GetProdTessWeld ()
 
CoreExport void SetProdTessWeld (BOOL weld)
 
Material/Mapping Access
CoreExport void setNumMaps (int ct, BOOL keep=TRUE)
 
int getNumMaps ()
 
CoreExport void setMapSupport (int chan, BOOL init=TRUE)
 
BOOL getMapSupport (int mp)
 
int NumMapChannels ()
 
CoreExport void ApplyUVWMap (int type, float utile, float vtile, float wtile, int uflip, int vflip, int wflip, int cap, const Matrix3 &tm, int channel=1)
 
CoreExport BOOL RecordTopologyTags ()
 
CoreExport void Transform (Matrix3 &tm)
 
CoreExport BOOL Weld (float thresh, BOOL weldIdentical=FALSE, int startVert=0)
 
CoreExport BOOL Weld (int fromVert, int toVert)
 
CoreExport void DeletePatchParts (BitArray &delVerts, BitArray &delPatches)
 
CoreExport void Subdivide (int type, BOOL propagate)
 
CoreExport void AddPatch (int type)
 
CoreExport int AddHook ()
 
CoreExport int AddHook (int index)
 
CoreExport int AddHook (int vertIndex, int segIndex)
 
CoreExport int RemoveHook ()
 
CoreExport int UpdateHooks ()
 
CoreExport void ChangePatchToLinearMapping (int index)
 
CoreExport void ChangePatchToCurvedMapping (int index)
 
CoreExport BOOL ArePatchesLinearMapped (int index)
 
CoreExport BOOL ArePatchesCurvedMapped (int index)
 
Patch Normals Methods
CoreExport Point3 AverageNormals (int type=PATCH_PATCH)
 
CoreExport Point3 PatchNormal (int index)
 
CoreExport void BuildPatchNormals ()
 
CoreExport void InvalidatePatchNormals ()
 
CoreExport Point3 EdgeNormal (int index)
 
CoreExport void MoveNormal (float amount, BOOL useLocalNorms, int type)
 
CoreExport void FlipPatchNormal (int index)
 
CoreExport void UnifyNormals (BOOL useSel)
 
Bevel Operations
CoreExport void CreateBevel ()
 
CoreExport void Bevel (float amount, int smoothStart, int smoothEnd)
 
Point3 GetBevelDir (int patchVertID)
 
Conversion to Mesh
 
CoreExport void ComputeMesh (Mesh &m, DWORD convertFlags)
 
Selection Weights
CoreExport float * GetVSelectionWeights ()
 
CoreExport void SupportVSelectionWeights ()
 
- Public Member Functions inherited from BaseInterfaceServer
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Public Attributes

int numVerts
 
int numVecs
 
int numPatches
 
int numEdges
 
Patchpatches
 
PatchVecvecs
 
PatchEdgeedges
 
Tab< HookPointhooks
 
Tab< Point3hookTopoMarkers
 
Tab< Point3hookTopoMarkersA
 
Tab< Point3hookTopoMarkersB
 
Point3normals
 
BOOL normalsBuilt
 
PatchVertverts
 
Tab< intnumTVerts
 
Tab< PatchTVert * > tVerts
 
Tab< TVPatch * > tvPatches
 
BitArray vecSel
 
BitArray vertSel
 
BitArray edgeSel
 
BitArray patchSel
 
int bezVecVert
 
DWORD dispFlags
 
DWORD selLevel
 
int cacheSteps
 
BOOL cacheAdaptive
 
BOOL unrelaxedMeshValid
 
BOOL relaxedMeshValid
 
Tab< Point3extrudeDeltas
 
MaxSDK::Array< ExtrudeDataextrudeData
 
Tab< Point3edgeNormals
 
Tab< intnewEdges
 
Tab< intnewVerts
 
BitArray bevelEdges
 
Tab< float > edgeDistances
 
float mFalloff
 
float mPinch
 
float mBubble
 
int mEdgeDist
 
int mUseEdgeDist
 
int mAffectBackface
 
int mUseSoftSelections
 

Friends

class Patch
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Constructor & Destructor Documentation

Remarks
Constructor. Initializes data members (see Init() below).
CoreExport PatchMesh ( PatchMesh fromPatch)
Remarks
Constructor. This PatchMesh is initialized from the specified PatchMesh.
Remarks
Destructor. Frees up allocated arrays.

Member Function Documentation

CoreExport int HookFixTopology ( )
CoreExport void Init ( )
Remarks
Initializes the data members to default values.
CoreExport PatchMesh& operator= ( PatchMesh fromPatchMesh)
Remarks
Assignment operator from another PatchMesh.
CoreExport PatchMesh& operator= ( Mesh fromMesh)
Remarks
Assignment operator. This operator will do the conversion from a Mesh to a PatchMesh. Note that this can get very slow if there are a lot of faces in the mesh. When the system does the conversion is must do a fair amount of work with its interior connection lists. It builds a data base of what is connected to what and makes sure that the PatchMesh doesn't have any places where an edge is used by more than two patches. Also, for every face in the mesh it generates a triangular patch. Therefore use this method with some caution as it can create some very complex PatchMesh objects.
CoreExport void CopyPatchDataFrom ( PatchMesh fromPatchMesh)
Remarks
This method is available in release 3.0 and later only.

The following is similar to operator=, but just takes the major components, not the display flags, selection level, etc.
Parameters:
PatchMesh &fromPatchMesh

The patch mesh to copy from.
CoreExport BOOL setNumVerts ( int  ct,
BOOL  keep = FALSE 
)
Remarks
Sets the number of vertices in the patch mesh.
Parameters:
int ct

The new number of vertices.

BOOL keep = FALSE

If TRUE any old vertices are copied to the new array; otherwise they are freed.
Returns
TRUE if the number of vertices was allocated; otherwise FALSE.
int getNumVerts ( void  )
inline
Remarks
Returns the number of vertices in the patch mesh.
1302 { return numVerts; }
int numVerts
Definition: patch.h:1202
void setVert ( int  i,
const Point3 xyz 
)
inline
Remarks
Sets the 'i-th' vertex.
Parameters:
int i

The index of the vertex to set.

const Point3 &xyz

The vertex location.
1310 { verts[i].p = xyz; }
PatchVert * verts
Definition: patch.h:1222
Point3 p
Definition: patch.h:231
void setVert ( int  i,
float  x,
float  y,
float  z 
)
inline
Remarks
Sets the 'i-th' vertex.
Parameters:
int i

The index of the vertex to set.

float x, float y, float z

The vertex location.
1317 { verts[i].p.x=x; verts[i].p.y=y; verts[i].p.z=z; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
float y
Definition: point3.h:55
PatchVert * verts
Definition: patch.h:1222
Point3 p
Definition: patch.h:231
float z
Definition: point3.h:55
float x
Definition: point3.h:55
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
PatchVert& getVert ( int  i)
inline
Remarks
Returns the 'i-th' vertex.
Parameters:
int i

The index of the vertex to retrieve.
1323 { return verts[i]; }
PatchVert * verts
Definition: patch.h:1222
PatchVert* getVertPtr ( int  i)
inline
Remarks
Returns the address of the 'i-th' vertex.
Parameters:
int i

The index of the vertex.
1328 { return verts+i; }
PatchVert * verts
Definition: patch.h:1222
CoreExport BOOL setNumVecs ( int  ct,
BOOL  keep = FALSE 
)
Remarks
Sets the number of vectors.
Parameters:
int ct

The new vector count.

BOOL keep = FALSE

If TRUE any previous vectors are copied; otherwise they are freed.
Returns
TRUE if the number was allocated and set; otherwise FALSE.
int getNumVecs ( void  )
inline
Remarks
Returns the number of vectors.
1342 { return numVecs; }
int numVecs
Definition: patch.h:1203
CoreExport BOOL setNumPatches ( int  ct,
BOOL  keep = FALSE 
)
Remarks
Sets the number of patches.
Parameters:
int ct

The new patch count.

BOOL keep = FALSE

If TRUE any previous patches are copied; otherwise they are freed.
Returns
TRUE if the number was allocated and set; otherwise FALSE.
int getNumPatches ( void  )
inline
Remarks
Returns the number of patches.
1356 { return numPatches; }
int numPatches
Definition: patch.h:1204
CoreExport BOOL setNumEdges ( int  ct,
BOOL  keep = FALSE 
)
Remarks
Sets the number of edges.
Parameters:
int ct

The new edge count.

BOOL keep = FALSE

If TRUE any previous edges are copied; otherwise they are freed.
Returns
TRUE if the number was allocated and set; otherwise FALSE.
int getNumEdges ( void  )
inline
Remarks
Returns the number of edges.
1370 { return numEdges; }
int numEdges
Definition: patch.h:1205
void setVec ( int  i,
const Point3 xyz 
)
inline
Remarks
Sets the 'i-th' vector.
Parameters:
int i

The index of the vector to set.

const Point3 &xyz

The vector to set.
1381 { vecs[i].p = xyz; }
PatchVec * vecs
Definition: patch.h:1207
Point3 p
Definition: patch.h:121
void setVec ( int  i,
float  x,
float  y,
float  z 
)
inline
Remarks
Sets the 'i-th' vector.
Parameters:
int i

The index of the vector to set.

float x, float y, float z

The vector values to set.
1388 { vecs[i].p.x=x; vecs[i].p.y=y; vecs[i].p.z=z; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
float y
Definition: point3.h:55
PatchVec * vecs
Definition: patch.h:1207
float z
Definition: point3.h:55
float x
Definition: point3.h:55
Point3 p
Definition: patch.h:121
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
PatchVec& getVec ( int  i)
inline
Remarks
Returns the 'i-th' vector.
Parameters:
int i

The index of the vector to retrieve.
1394 { return vecs[i]; }
PatchVec * vecs
Definition: patch.h:1207
PatchVec* getVecPtr ( int  i)
inline
Remarks
Returns the address of the 'i-th' vector.
Parameters:
int i

The index of the vector.
1399 { return vecs+i; }
PatchVec * vecs
Definition: patch.h:1207
PRVertex& getRVert ( int  i)
inline
Remarks
This method is not currently used.
1405 { return rVerts[i]; }
PRVertex* getRVertPtr ( int  i)
inline
Remarks
This method is not currently used.
1407 { return rVerts+i; }
PRVertex& getRVec ( int  i)
inline
1410 { return rVecs[i]; }
PRVertex* getRVecPtr ( int  i)
inline
1411 { return rVecs+i; }
BOOL setNumTVertsChannel ( int  mp,
int  ct,
BOOL  keep = FALSE 
)
inline
Remarks
This method is available in release 2.0 and later only.

Sets the number of mapping vertices in the original TV map or vertex color channel.
Parameters:
int mp

Specifies the channel. If 0, the number of vertices in the original mapping channel (map channel 1) is set. If nonzero, the number of vertices in the vertex color channel (map channel 0) is set.

int ct

The number of map vertices desired.

BOOL keep=FALSE

If TRUE, any existing mapping verts are copied over into the new array.
Returns
TRUE on success; otherwise FALSE.
1432 { return setNumMapVerts (mp?0:1, ct, keep); }
CoreExport BOOL setNumMapVerts(int mp, int ct, BOOL keep=FALSE)
BOOL setNumTVerts ( int  ct,
BOOL  keep = FALSE 
)
inline
Remarks
Sets the number of mapping verts in the original mapping channel (channel 1).
Parameters:
int ct

The number of map vertices desired.

BOOL keep = FALSE

If TRUE, any existing mapping verts are copied over into the new array.
Returns
TRUE if successful, FALSE if unsuccessful.
1441 { return setNumMapVerts (1, ct, keep); }
CoreExport BOOL setNumMapVerts(int mp, int ct, BOOL keep=FALSE)
int getNumTVertsChannel ( int  mp) const
inline
Remarks
This method is available in release 2.0 and later only.

Returns the number of mapping verts in the original map or vertex colors.
Parameters:
int mp

If 0, the number of vertices in the original mapping channel (map channel 1) is returned. If nonzero, the number of vertices in the vertex color channel (map channel 0) is returned.
1451 { return numTVerts[mp?0:1]; }
Tab< int > numTVerts
Definition: patch.h:1225
int getNumTVerts ( ) const
inline
Remarks
Returns the number of mapping vertices in the original mapping channel (channel 1).
1454 { return getNumMapVerts(1); }
CoreExport int getNumMapVerts(int mp) const
CoreExport BOOL setNumMapVerts ( int  mp,
int  ct,
BOOL  keep = FALSE 
)
Remarks
This method is available in release 3.0 and later only.

Sets the number of mapping verts in the specified mapping channel.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int ct

The number of mapping verts desired.

BOOL keep=FALSE

If TRUE any old vertices are copied to the new array; otherwise they are freed.
Returns
TRUE if the number of vertices was allocated; otherwise FALSE.
CoreExport int getNumMapVerts ( int  mp) const
Remarks
This method is available in release 3.0 and later only.

Returns the number of mapping verts in the specified mapping channel.
Parameters:
int mp

In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.
CoreExport PatchTVert* mapVerts ( int  mp) const
Remarks
This method is available in release 4.0 and later only.

Returns a pointer to the list of PatchTVerts for the specified channel of this patch.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.
CoreExport TVPatch* mapPatches ( int  mp) const
BOOL setNumTVPatchesChannel ( int  channel,
int  ct,
BOOL  keep = FALSE,
int  oldCt = 0 
)
inline
Remarks
This method is available in release 2.0 and later only.

Sets the number of map patches in the original TV or vertex color channels. (Note that setNumMapPatches() is called from setNumPatches(), so this doesn't need to be called separately once a map channel is active.)

Note:

If the map patches are NULL and keep = TRUE they stay NULL.

If the map patches are NULL and keep = FALSE they are allocated, and map verts also init themselves from the main vert array.

If the map patches are non-NULL and ct = 0 they are set to NULL (and freed)
Parameters:
int channel

If 0, the number of map patches in the original map channel are set. If nonzero, the number of map patches in the vertex color channel is set.

int ct

The number of map patches desired – should match the number of patches.

BOOL keep=FALSE

The keep flag. See above.

int oldCt=0

The old number of patches. This is important for determining how much to copy over when keep is TRUE.
Returns
TRUE if storage has been allocated and the number is set; otherwise FALSE.
1530 { return setNumMapPatches (channel?0:1, ct, keep, oldCt); }
CoreExport BOOL setNumMapPatches(int channel, int ct, BOOL keep=FALSE, int oldCt=0)
BOOL setNumTVPatches ( int  ct,
BOOL  keep = FALSE,
int  oldCt = 0 
)
inline
Remarks
Sets the number of map patches in the original TV channel. (Note that setNumMapPatches() is called from setNumPatches(), so this doesn't need to be called separately once a map channel is active.)

Note:

If the map patches are NULL and keep = TRUE they stay NULL.

If the map patches are NULL and keep = FALSE they are allocated, and map verts also init themselves from the main vert array.

If the map patches are non-NULL and ct = 0 they are set to NULL (and freed)
Parameters:
int ct

The number of map patches desired – should match the number of patches.

BOOL keep=FALSE

If TRUE, existing map patches are copied into the new map patch array. oldCt should specify how many patches were around previously.

int oldCt=0

The old number of patches. This is important for determining how much to copy over when keep is TRUE.
Returns
TRUE if storage has been allocated and the number is set; otherwise FALSE.
1553 { return setNumMapPatches (1, ct, keep, oldCt); }
CoreExport BOOL setNumMapPatches(int channel, int ct, BOOL keep=FALSE, int oldCt=0)
CoreExport BOOL setNumMapPatches ( int  channel,
int  ct,
BOOL  keep = FALSE,
int  oldCt = 0 
)
Remarks
This method is available in release 3.0 and later only.

Sets the number of map patches in the specified map channel. (Note that this is called from setNumPatches(), so it doesn't need to be called separately once a map channel is active.)

Note:

If the map patches are NULL and keep = TRUE they stay NULL.

If the map patches are NULL and keep = FALSE they are allocated, and map verts also init themselves from the main vert array.

If the map patches are non-NULL and ct = 0 they are set to NULL (and freed).
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int ct

The number of map patches desired – should match the number of patches.

BOOL keep=FALSE

If TRUE, existing map patches are copied into the new map patch array. oldCt should specify how many patches were around previously.

int oldCt=0

The old number of patches. This is important for determining how much to copy over when keep is TRUE.
Returns
TRUE if storage has been allocated and the number is set; otherwise FALSE.
void setTVertChannel ( int  channel,
int  i,
const UVVert xyz 
)
inline
Remarks
This method is available in release 2.0 and later only.

Sets the 'i-th' map vertex of the specified channel.
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The index of the map vertex to set.

const UVVert &xyz

The value to set.
1597 { tVerts[channel?0:1][i] = xyz; }
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
void setTVert ( int  i,
const UVVert xyz 
)
inline
Remarks
Sets the 'i-th' map vertex.
Parameters:
int i

The index of the map vertex to set.

const UVVert &xyz

The value to set.
1604 { tVerts[1][i] = xyz; }
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
void setTVertChannel ( int  channel,
int  i,
float  x,
float  y,
float  z 
)
inline
Remarks
This method is available in release 2.0 and later only.

Sets the 'i-th' map vertex of the specified channel.
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The index of the map vertex to set.

float x, float y, float z

The values to set.
1616 { tVerts[channel?0:1][i].p.x=x; tVerts[channel?0:1][i].p.y=y; tVerts[channel?0:1][i].p.z=z; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
void setTVert ( int  i,
float  x,
float  y,
float  z 
)
inline
Remarks
Sets the 'i-th' map vertex.
Parameters:
int i

The index of the map vertex to set.

float x, float y, float z

The values to set.
1623 { tVerts[1][i].p.x=x; tVerts[1][i].p.y=y; tVerts[1][i].p.z=z; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
void setTVPatchChannel ( int  channel,
int  i,
TVPatch tvp 
)
inline
Remarks
This method is available in release 3.0 and later only.

Sets the 'i-th' map patch.
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The index of the map vertex to set.

TVPatch &tvp

The map patch to set.
1635 { tvPatches[channel?0:1][i] = tvp; }
Tab< TVPatch * > tvPatches
Definition: patch.h:1227
void setTVPatch ( int  i,
TVPatch tvp 
)
inline
Remarks
This method is available in release 3.0 and later only.

Sets the specified map patch.
Parameters:
int i

The zero based index of the texture patch to set.

TVPatch &tvp

The map patch to set.
1644 { tvPatches[1][i] = tvp; }
Tab< TVPatch * > tvPatches
Definition: patch.h:1227
PatchTVert& getTVertChannel ( int  channel,
int  i 
)
inline
Remarks
This method is available in release 2.0 and later only.

Previous to R4, this method returned an UVVert&.

Returns the 'i-th' map vertex of the specified channel.
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The index of the map vertex to retrieve.
1655 { return tVerts[channel?0:1][i]; }
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
PatchTVert& getTVert ( int  i)
inline
Remarks
Previous to R4, this method returned an UVVert&.

Returns the 'i-th' map vertex.
Parameters:
int i

The index of the map vertex to retrieve.
1661 { return tVerts[1][i]; }
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
PatchTVert* getTVertPtrChannel ( int  channel,
int  i 
)
inline
Remarks
This method is available in release 2.0 and later only.

Previous to R4, this method returned an UVVert*.

Returns a pointer to the 'i-th' map vertex of the specified channel.
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The index of the texture vertex.
1672 { return tVerts[channel?0:1]+i; }
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
PatchTVert* getTVertPtr ( int  i)
inline
Remarks
Previous to R4, this method returned an UVVert*.

Returns a pointer to the 'i-th' map vertex.
Parameters:
int i

The index of the map vertex.
1678 { return tVerts[1]+i; }
Tab< PatchTVert * > tVerts
Definition: patch.h:1226
TVPatch& getTVPatchChannel ( int  channel,
int  i 
)
inline
Remarks
This method is available in release 2.0 and later only.

Returns the 'i-th' texture patch structure of the specified channel.
Parameters:
int channel

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The index of the TVPatch.
1692 { return tvPatches[channel?0:1][i]; }
Tab< TVPatch * > tvPatches
Definition: patch.h:1227
TVPatch& getTVPatch ( int  i)
inline
Remarks
This method is available in release 2.0 and later only.

Returns the 'i-th' texture patch from map channel 1.
Parameters:
int i

The index of the TVPatch.
1699 { return tvPatches[1][i]; }
Tab< TVPatch * > tvPatches
Definition: patch.h:1227
void setMapVert ( int  mp,
int  i,
const UVVert xyz 
)
inline
Remarks
This method is available in release 3.0 and later only.

Sets the specified mapping vertex in the channel passed.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The zero based index of the vert to set.

const UVVert &xyz

The vert to set.
1716 { mapVerts(mp)[i] = xyz; }
CoreExport PatchTVert * mapVerts(int mp) const
void setMapVert ( int  mp,
int  i,
float  x,
float  y,
float  z 
)
inline
Remarks
This method is available in release 3.0 and later only.

Sets the specified mapping vertex in the channel passed.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The zero based index of the vert to set.

float x

The x coordinate of the vert to set.

float y

The y coordinate of the vert to set.

float z

The z coordinate of the vert to set.
1732 { Point3 MV(x,y,z); setMapVert (mp, i, MV); }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
Definition: point3.h:51
void setMapVert(int mp, int i, const UVVert &xyz)
Definition: patch.h:1716
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
void setMapPatch ( int  mp,
int  i,
const TVPatch tvp 
)
inline
Remarks
This method is available in release 3.0 and later only.

Sets the specified mapping patch in the channel passed.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The zero based index of the TVPatch to set.

const TVPatch &tvp

The map patch to set.
1744 { mapPatches(mp)[i] = tvp; }
CoreExport TVPatch * mapPatches(int mp) const
PatchTVert& getMapVert ( int  mp,
int  i 
)
inline
Remarks
This method is available in release 3.0 and later only.

Previous to R4, this method returned an UVVert&.

Returns a reference to the specified mapping vert from the specified channel.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The zero based index of the vert to get.
1756 { return mapVerts(mp)[i]; }
CoreExport PatchTVert * mapVerts(int mp) const
PatchTVert* getMapVertPtr ( int  mp,
int  i 
)
inline
Remarks
This method is available in release 3.0 and later only.

Previous to R4, this method returned an UVVert*.

Returns a pointer to the specified mapping vert from the specified channel.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The zero based index of the vert to get.
1768 { return mapVerts(mp) + i; }
CoreExport PatchTVert * mapVerts(int mp) const
TVPatch& getMapPatch ( int  mp,
int  i 
)
inline
Remarks
This method is available in release 3.0 and later only.

Returns a reference to the specified map patch from the specified channel.
Parameters:
int mp

The mapping channel. In this method, 0 is the vertex color channel, and channels 1 through MAX_MESHMAPS-1 are the map channels.

int i

The zero based index of the map patch to get.
1779 { return mapPatches(mp)[i]; }
CoreExport TVPatch * mapPatches(int mp) const
CoreExport MtlID getPatchMtlIndex ( int  i)
CoreExport void setPatchMtlIndex ( int  i,
MtlID  id 
)
CoreExport BOOL buildLinkages ( int  patch = -1)
Remarks
This is an important method to call after putting together a PatchMesh. This method does the work to figure out how the PatchMesh is connected together, one patch to another. It determines which edges are used by which patches and so on.
Parameters:
int patch

This option is available in release 4.0 and later only.

This optional parameter allows you to only update adjacency information for a single new patch. If the plugin code is adding new patches and not removing any others then you can call this method with the new patch index and the various adjacency information in vertices, vectors, and edges will be built. If you call this method for the entire object (no parameter or patch < 0) it will destroy all adjacency information and rebuild it from scratch.
Returns
TRUE if the patch mesh is valid, FALSE if it is not.
CoreExport void computeInteriors ( )
Remarks
This method computes the interior bezier points for each patch in the mesh. This method should be called after any modifications have been made to alter the PatchMesh(for example changes to point positions). If there are any automatic patches this will compute the interior vectors.
CoreExport void computeAux ( )
CoreExport void render ( GraphicsWindow gw,
Material ma,
RECT *  rp,
int  compFlags,
int  numMat = 1 
)
Remarks
Renders a patch mesh using the specified graphics window and array of materials.
Parameters:
GraphicsWindow *gw

Points to the graphics window to render to.

Material *ma

The list of materials to use to render the patch.

RECT *rp

Specifies the rectangular region to render. If the patch mesh should be rendered to the entire viewport pass NULL.

int compFlags

One or more of the following flags:

COMP_TRANSFORM

Forces recalculation of the model to screen transformation; otherwise attempt to use the cache.

COMP_IGN_RECT

Forces all polygons to be rendered; otherwise only those intersecting the box will be rendered.

COMP_LIGHTING

Forces re-lighting of all vertices (as when a light moves); otherwise only re-light moved vertices

COMP_ALL

All of the above flags.

COMP_OBJSELECTED

If this bit is set then the node being displayed by this mesh is selected. Certain display flags only activate when this bit is set.

COMP_OBJFROZEN

If this bit is set then the node being displayed by this mesh is frozen.

int numMat=1

The number of materials supported.
CoreExport BOOL select ( GraphicsWindow gw,
Material ma,
HitRegion hr,
int  abortOnHit = FALSE,
int  numMat = 1 
)
Remarks
Checks the given HitRecord hr to see if it intersects the patch mesh object.
Parameters:
GraphicsWindow *gw

Points to the graphics window to check.

Material *ma

The list of materials for the patch mesh.

HitRegion *hr

This describes the properties of a region used for the hit testing. See Class HitRegion.

int abortOnHit = FALSE

If nonzero, the hit testing is complete after any hit; otherwise all hits are checked.

int numMat=1

The number of materials supported.
Returns
TRUE if the item was hit; otherwise FALSE.
CoreExport void snap ( GraphicsWindow gw,
SnapInfo snap,
IPoint2 p,
Matrix3 tm 
)
Remarks
Checks to see if there is a snap point near the given mouse point.
Parameters:
GraphicsWindow *gw

The graphics window in which to check.

SnapInfo *snap

This structure describes the snap settings used, and the results of the snap test. See Structure SnapInfo.

IPoint2 *p

The mouse point to check.

Matrix3 &tm

The object transformation matrix. This is the transformation to place the object into the world coordinate system.
CoreExport BOOL SubObjectHitTest ( GraphicsWindow gw,
Material ma,
HitRegion hr,
DWORD  vflags,
SubPatchHitList hitList,
int  numMat = 1 
)
Remarks
This method may be called to perform sub-object hit testing of the patch mesh.
Parameters:
GraphicsWindow *gw

The graphics window associated with the viewport the patch mesh is being hit tested in.

Material *ma

The list of materials for the patch mesh.

HitRegion *hr

This describes the properties of a region used for the hit testing. See Class HitRegion.

DWORD vflags

Flags for sub object hit testing. One or more of the following values:

SUBHIT_PATCH_SELONLY

Selected only.

SUBHIT_PATCH_UNSELONLY

Unselected only.

SUBHIT_PATCH_ABORTONHIT

Abort hit testing on the first hit found.

SUBHIT_PATCH_SELSOLID

This treats selected items as solid and unselected items as not solid. Treating an item as solid means the patch will be hit if the mouse is anywhere inside the patch region and not just over a visible edge.

SUBHIT_PATCH_VERTS

Hit test vertices.

SUBHIT_PATCH_VECS

Hit test vectors.

SUBHIT_PATCH_PATCHES

Hit test patches.

SUBHIT_PATCH_EDGES

Hit test edges.

SubPatchHitList& hitList

See Class SubPatchHitList.

int numMat=1

The number of materials for the mesh.
Returns
TRUE if the item was hit; otherwise FALSE.
CoreExport void renderGizmo ( GraphicsWindow gw)
Remarks
This method is available in release 4.0 and later only.

This method will render a 'gizmo' version of the PatchMesh and is used primarily by Editable Patch and Edit Patch to facilitate the Show End Result feature.
Parameters:
GraphicsWindow *gw

The graphics window associated with the viewport the patch mesh gizmo should be shown in.
CoreExport void buildBoundingBox ( void  )
Remarks
Computes the bounding box of the patch mesh. The bounding box is stored with the patch mesh object, use getBoundingBox() to retrieve it.
CoreExport Box3 getBoundingBox ( Matrix3 tm = NULL)
Remarks
Retrieves the bounding box of the patch mesh object.
Parameters:
Matrix3 *tm=NULL

The optional TM allows the box to be calculated in any space.
CoreExport void GetDeformBBox ( Box3 box,
Matrix3 tm = NULL,
BOOL  useSel = FALSE 
)
CoreExport void InvalidateGeomCache ( )
Remarks
This method should be called when the PatchMesh changes. It invalidates the caches of the patch mesh.
CoreExport void InvalidateMesh ( )
CoreExport void InvalidateRelaxedMesh ( )
CoreExport void FreeAll ( )
Remarks
Frees everything from the patch mesh.
CoreExport void ShallowCopy ( PatchMesh amesh,
ChannelMask  channels 
)
Remarks
This method is used internally in data flow evaluation.
CoreExport void DeepCopy ( PatchMesh amesh,
ChannelMask  channels 
)
Remarks
This method is used internally in data flow evaluation.
CoreExport void NewAndCopyChannels ( ChannelMask  channels)
Remarks
This method is used internally in data flow evaluation.
CoreExport void FreeChannels ( ChannelMask  channels,
int  zeroOthers = 1 
)
Remarks
This method is used internally in data flow evaluation.
void SetDispFlag ( DWORD  f)
inline
Remarks
Sets the state of the specified display flags.
Parameters
f- The flags to set. See Patch Flags.
1974 { dispFlags |= f; }
DWORD dispFlags
Definition: patch.h:1239
DWORD GetDispFlag ( DWORD  f)
inline
Remarks
Returns the state of the specified display flags.
Parameters
f- The flags to get. See Patch Flags.
1977 { return dispFlags & f; }
DWORD dispFlags
Definition: patch.h:1239
void ClearDispFlag ( DWORD  f)
inline
Remarks
Clears the specified display flags.
Parameters
f- The flags to clear. See Patch Flags.
1980 { dispFlags &= ~f; }
DWORD dispFlags
Definition: patch.h:1239
BitArray& VecSel ( )
inline
1986 { return vecSel; } // CAL-06/10/03: (FID #1914)
BitArray vecSel
Definition: patch.h:1230
BitArray& VertSel ( )
inline
Remarks
Returns the bits representing the vertex selection status. See the Data Members above. See Class BitArray.
1990 { return vertSel; }
BitArray vertSel
Definition: patch.h:1231
BitArray& EdgeSel ( )
inline
Remarks
Returns the bits representing the edge selection status. See the Data Members above. See Class BitArray.
1993 { return edgeSel; }
BitArray edgeSel
Definition: patch.h:1232
BitArray& PatchSel ( )
inline
Remarks
Returns the bits representing the patch selection status. See the Data Members above. See Class BitArray.
1996 { return patchSel; }
BitArray patchSel
Definition: patch.h:1233
CoreExport BitArray VertexTempSel ( )
Remarks
Constructs a vertex selection list based on the current selection level. For example if the selection level is at object level all the bits are set. If the selection level is at vertex level only the selected vertex bits are set. See Class BitArray.
CoreExport void ApplyConstraints ( BOOL  selOnly = FALSE)
Remarks
This method may be called to apply the coplanar constraints to the patch mesh. The constraints may optionally only apply to selected vertices. There is a flag that may be set for a patch vertex (PVERT_COPLANAR). For example, you can set this flag to make a vertex coplanar with its vectors. If this is done, then when this method is called, the patch code will then go through the PatchMesh and find the average plane that is used by the vertex and all the vectors associated with it. It will then constrain all the vectors to lie in this plane (by rotating them so that they lie on the plane). In this way there will be a consistent transition between the patches sharing the vertex.
Parameters:
BOOL selOnly = FALSE

If TRUE the constraints are only applied to the selected vertices; otherwise all vertices.
CoreExport BOOL MakeQuadPatch ( int  index,
int  va,
int  vab,
int  vba,
int  vb,
int  vbc,
int  vcb,
int  vc,
int  vcd,
int  vdc,
int  vd,
int  vda,
int  vad,
int  i1,
int  i2,
int  i3,
int  i4,
DWORD  sm 
)
Remarks
Create a quadrilateral patch given a patch index and a list of all the vertices, vectors, interiors, and a smoothing group.
Parameters:
int index - The index of the patch to create (0>= index < numPatches).

int va - The first vertex.

int vab - Vector ab.

int vba - Vector ba.

int vb - The second vertex.

int vbc - Vector bc.

int vcb - Vector cb.

int vc - The third vertex.

int vcd - Vector cd.

int vdc - Vector dc.

int vd - The fourth vertex.

int vda - Vector da.

int vad - Vector ad.

int i1 - Interior 1.

int i2 - Interior 2.

int i3 - Interior 3.

int i4 - Interior 4.

DWORD sm - The smoothing group.
Returns
TRUE if the patch was created; otherwise FALSE.
CoreExport BOOL MakeTriPatch ( int  index,
int  va,
int  vab,
int  vba,
int  vb,
int  vbc,
int  vcb,
int  vc,
int  vca,
int  vac,
int  i1,
int  i2,
int  i3,
DWORD  sm 
)
Remarks
Create a triangular patch given a patch index and a list of all the vertices, vectors, interiors, and a smoothing group.
Parameters:
int index - The index of the patch to create (0>= index < numPatches).

int va - The first vertex.

int vab - Vector ab.

int vba - Vector ba.

int vb - The second vertex.

int vbc - Vector bc.

int vcb - Vector cb.

int vc - The third vertex.

int vca - Vector ca.

int vac - Vector ac.

int i1 - Interior 1.

int i2 - Interior 2.

int i3 - Interior 3.

DWORD sm - The smoothing group.
Returns
TRUE if the patch was created; otherwise FALSE.
CoreExport void SetMeshSteps ( int  steps)
Remarks
Sets the number of steps along each edge that determines how fine the mesh is generated off the patch.
Parameters:
int steps

The number of steps to set.
CoreExport int GetMeshSteps ( )
Remarks
Returns the number of mesh steps.
CoreExport void SetMeshStepsRender ( int  steps)
Remarks
This method is available in release 3.0 and later only.

Sets the Surface Render Steps setting.
Parameters:
int steps

The value to set.
CoreExport int GetMeshStepsRender ( )
Remarks
This method is available in release 3.0 and later only.

Returns the Surface Render Steps setting.
CoreExport void SetShowInterior ( BOOL  si)
Remarks
This method is available in release 3.0 and later only.

Sets the 'Show Interior Edges' value.
Parameters:
BOOL si

TRUE for on; FALSE for off.
CoreExport BOOL GetShowInterior ( )
Remarks
This method is available in release 3.0 and later only.

Returns the 'Show Interior Edge' setting; TRUE if on; FALSE if off.
CoreExport void SetUsePatchNormals ( BOOL  usePatchNorm)
CoreExport BOOL GetUsePatchNormals ( )
CoreExport void SetAdaptive ( BOOL  sw)
Remarks
This is currently not used. Reserved for future use.
CoreExport BOOL GetAdaptive ( )
Remarks
This is currently not used. Reserved for future use.
CoreExport void SetViewTess ( TessApprox  tess)
Remarks
This method is available in release 2.0 and later only.

Sets the tessellation approximation object used for viewport rendering.
Parameters:
TessApprox tess

The tessellation approximation object to be used for viewport rendering.
CoreExport TessApprox GetViewTess ( )
Remarks
This method is available in release 2.0 and later only.

Returns the tessellation approximation object used for rendering in the viewports.
CoreExport void SetProdTess ( TessApprox  tess)
Remarks
This method is available in release 2.0 and later only.

Sets the tessellation approximation object used for production rendering.
Parameters:
TessApprox tess

The tessellation approximation object to be used for production rendering.
CoreExport TessApprox GetProdTess ( )
Remarks
This method is available in release 2.0 and later only.

Returns the tessellation approximation object used for production rendering.
CoreExport void SetDispTess ( TessApprox  tess)
Remarks
This method is available in release 3.0 and later only.

Sets the tessellation approximation object used for display in the viewports.
Parameters:
TessApprox tess

The tessellation approximation object to be used for the viewports.
CoreExport TessApprox GetDispTess ( )
Remarks
This method is available in release 3.0 and later only.

Returns the tessellation approximation object used for display in the viewports.
CoreExport BOOL GetViewTessNormals ( )
Remarks
This method is available in release 3.0 and later only.

Returns TRUE if normals are used from the viewport tessellator; otherwise FALSE.
CoreExport void SetViewTessNormals ( BOOL  use)
Remarks
This method is available in release 3.0 and later only.

Sets if normals are used from the viewport tessellator.
Parameters:
BOOL use

TRUE to use normals; FALSE to not use them.
CoreExport BOOL GetProdTessNormals ( )
Remarks
This method is available in release 3.0 and later only.

Returns TRUE if normals are used from the production renderer tessellator; otherwise FALSE.
CoreExport void SetProdTessNormals ( BOOL  use)
Remarks
This method is available in release 3.0 and later only.

Sets if normals are used from the production renderer tessellator.
CoreExport BOOL GetViewTessWeld ( )
Remarks
This method is available in release 3.0 and later only.

Returns TRUE if the viewport mesh is welded after tessellation; otherwise FALSE.
CoreExport void SetViewTessWeld ( BOOL  weld)
Remarks
This method is available in release 3.0 and later only.

Sets if the viewport mesh is welded after tessellation; otherwise FALSE.
Parameters:
BOOL weld

TRUE to weld; FALSE to not weld.
CoreExport BOOL GetProdTessWeld ( )
Remarks
This method is available in release 3.0 and later only.

Returns TRUE if the production renderer mesh is welded after tessellation; otherwise FALSE.
CoreExport void SetProdTessWeld ( BOOL  weld)
Remarks
This method is available in release 3.0 and later only.

Sets if the production renderer mesh is welded after tessellation; otherwise FALSE.
Parameters:
BOOL weld

TRUE to weld; FALSE to not weld.
int GetEdge ( int  v1,
int  v12,
int  v21,
int  v2,
int  p 
)
Remarks
This method is used internally.
CoreExport Tab<int> GetEdge ( int  v1,
int  v2 
) const
CoreExport Tab<int> GetPatches ( int  v1,
int  v2 
) const
CoreExport Tab<int> GetPatches ( int  vert) const
CoreExport Tab<int> GetEdges ( int  vert) const
CoreExport Tab<int> GetVectors ( int  vert) const
CoreExport void setNumMaps ( int  ct,
BOOL  keep = TRUE 
)
Remarks
This method is available in release 3.0 and later only.

Set the number of texture maps used by this PatchMesh.
Parameters:
int ct

The number to use. This is a value between 2 and MAX_MESHMAPS-1.

BOOL keep=TRUE

TRUE to keep the old mapping information after the resize; FALSE to discard it.
int getNumMaps ( )
inline
Remarks
This method is available in release 3.0 and later only.

Returns the number of mapping channels in use.
2242 { return numTVerts.Count(); }
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
Tab< int > numTVerts
Definition: patch.h:1225
CoreExport void setMapSupport ( int  chan,
BOOL  init = TRUE 
)
Remarks
This method is available in release 4.0 and later only.

This method will allocate mapping channels as needed. If the map channel is already present, no action is taken. Otherwise, the additional channels are created.
Parameters:
int chan

Specifies which channel. See Mapping Channels. If zero (special vertex color channel) and init is TRUE, all vertex colors are initialized to white (1,1,1).

BOOL init=TRUE

If TRUE, the channel is initialized to match the PatchMesh's structure.
BOOL getMapSupport ( int  mp)
inline
Remarks
This method is available in release 3.0 and later only.

Returns TRUE if the specified mapping channel is supported; otherwise FALSE.
Parameters:
int mp

Specifies which channel. See Mapping Channels.
2264 { return ((mp<tvPatches.Count()) && tvPatches[mp]) ? TRUE : FALSE; }
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
Tab< TVPatch * > tvPatches
Definition: patch.h:1227
int NumMapChannels ( )
inline
Remarks
This method is available in release 3.0 and later only.

Returns the maximum number of possible mapping channels.
2268 { return MAX_MESHMAPS; }
#define MAX_MESHMAPS
The higher limit of the mapping channels (map channel can be from 0 to MAX_MESHMAPS - 1) ...
Definition: mesh.h:424
CoreExport void ApplyUVWMap ( int  type,
float  utile,
float  vtile,
float  wtile,
int  uflip,
int  vflip,
int  wflip,
int  cap,
const Matrix3 tm,
int  channel = 1 
)
Remarks
This method may be called to map this PatchMesh with UVW mapping coordinates.
Parameters:
int type

The mapping type. One of the following values:

MAP_PLANAR

MAP_CYLINDRICAL

MAP_SPHERICAL

MAP_BALL

MAP_BOX

float utile

Number of tiles in the U direction.

float vtile

Number of tiles in the V direction.

float wtile

Number of tiles in the W direction.

int uflip

If nonzero the U values are mirrored.

int vflip

If nonzero the V values are mirrored.

int wflip

If nonzero the W values are mirrored.

int cap

This is used with MAP_CYLINDRICAL. If nonzero, then any patch normal that is pointing more vertically than horizontally will be mapped using planar coordinates.

const Matrix3 &tm

This defines the mapping space. As each point is mapped, it is multiplied by this matrix, and then it is mapped.

int channel=1

This parameter is available in release 2.0 and later only.

This indicates which channel the mapping is applied to – channel==1 corresponds to the original texture channel. Note that this is a change from what it meant before release 3.0. Previously channel 1 referred to the color per vertex channel (and this parameter defaulted to 0).
CoreExport BOOL RecordTopologyTags ( )
Remarks
This method tags the points in the patch components to record our topology (this stores identifying values in the various aux2 fields in the Patch). This information can be used after topology-changing operations to remap information tied to vertices, edges and patches.
Returns
Returns TRUE if tagged successfully; otherwise FALSE.
CoreExport void Transform ( Matrix3 tm)
Remarks
This method is available in release 3.0 and later only.

Transforms the vertices and vectors of the patch mesh, re- computes the interior bezier points for each patch in the mesh and invalidates the geometry cache.
Parameters:
Matrix3 &tm

The matrix to transform with.
CoreExport BOOL Weld ( float  thresh,
BOOL  weldIdentical = FALSE,
int  startVert = 0 
)
Remarks
This method is available in release 3.0 and later only.

This method is used internally.
CoreExport BOOL Weld ( int  fromVert,
int  toVert 
)
CoreExport void DeletePatchParts ( BitArray delVerts,
BitArray delPatches 
)
Remarks
This method is available in release 3.0 and later only.

This is a method which may be used to delete sets of verts or patches.
Parameters:
BitArray &delVerts

A bit array with bits set for verts to delete.

BitArray &delPatches

A bit array with bits set for patches set to delete.
CoreExport void Subdivide ( int  type,
BOOL  propagate 
)
Remarks
This method is available in release 3.0 and later only.

Subdivides the selected edge or patch.
Parameters:
int type

One of the following values:

SUBDIV_EDGES

Subdivides an edge.

SUBDIV_PATCHES

Subdivides an entire patch

BOOL propagate

TRUE to propagate; FALSE to not propagate.
CoreExport void AddPatch ( int  type)
Remarks
This method is available in release 3.0 and later only.

Add a patch of the desired type to each selected edge that doesn't have two patches attached.
Parameters:
int type

One of the following values:

PATCH_TRI

PATCH_QUAD
CoreExport int AddHook ( )
Remarks
This method is available in release 3.0 and later only.

This method is obsolete and should not be used.
CoreExport int AddHook ( int  index)
Remarks
This method is available in release 3.0 and later only.

This method is obsolete and should not be used.
CoreExport int AddHook ( int  vertIndex,
int  segIndex 
)
Remarks
This method is available in release 3.0 and later only.

This method is obsolete and should not be used.
CoreExport int RemoveHook ( )
Remarks
This method is available in release 3.0 and later only.

This method is obsolete and should not be used.
CoreExport int UpdateHooks ( )
Remarks
This method is available in release 3.0 and later only.

This method is used internally.
CoreExport BOOL WeldEdges ( )
Remarks
This method is available in release 4.0 and later only.

This method will weld any edges which are selected and have the same endpoints.
Returns
TRUE if any welding took place, otherwise FALSE.
CoreExport void ClonePatchParts ( BitArray patches = NULL)
Remarks
This method is available in release 4.0 and later only.

This method will copy the patches specified by the BitArray, or by the patch selection set if the BitArray patches pointer is NULL. This method is used by Editable Patch and Edit Patch to facilitate the shift-copy operations.
Parameters:
BitArray *patches

The array containing the series of selected patches.
CoreExport void CreateExtrusion ( int  type = PATCH_PATCH,
BOOL  edgeClone = FALSE 
)
Remarks
This method is available in release 3.0 and later only.

This method will create all the necessary geometry for an extrusion operation.
Parameters:
int type

This option is available in release 4.0 and later only.

Specifies the extrusion type, either PATCH_PATCH or PATCH_EDGE. If the extrusion type is set to PATCH_EDGE, then the edgeClone parameter will tell the function to clone the selected edges prior to creating the extrusion geometry.

BOOL edgeClone

This option is available in release 4.0 and later only.

The edge clone flag. If set to TRUE the function will clone the selected edges prior to creating the extrusion geometry.
CoreExport Point3 AverageNormals ( int  type = PATCH_PATCH)
Remarks
This method is available in release 3.0 and later only.

This method will allow you to obtain the average normal of all selected patches or edges.
Parameters:
int type

This option is available in release 4.0 and later only.

Specifies if the average normal return is based on all selected patches, using PATCH_PATCH, or all selected edges using PATCH_EDGE.
CoreExport Point3 PatchNormal ( int  index)
Remarks
This method is available in release 3.0 and later only.

This method is used internally.
CoreExport void BuildPatchNormals ( )
CoreExport void InvalidatePatchNormals ( )
CoreExport Point3 EdgeNormal ( int  index)
CoreExport void MoveNormal ( float  amount,
BOOL  useLocalNorms,
int  type 
)
Remarks
This method is used internally.
CoreExport void FlipPatchNormal ( int  index)
Remarks
This method is available in release 4.0 and later only.

This method flips the normal of the specified patch. This is done by reordering the vertices. If the PatchMesh has textures assigned to it then the texture patches are processed as well.
Parameters:
int index

The index of the patch for which you want to flip the normal.
CoreExport void UnifyNormals ( BOOL  useSel)
Remarks
This method is available in release 4.0 and later only.

This method makes sure the patches in the operation set are all facing the same direction. This is determined by the vertex order around the edges of the patch.
Parameters:
BOOL useSel

If this parameter is set to TRUE, the operation set is the set of selected patches as indicated by the patchSel BitArray. If this parameter is set to FALSE, all patches are processed.
CoreExport void CreateBevel ( )
Remarks
This method is available in release 3.0 and later only.

This method is used internally.
CoreExport void Bevel ( float  amount,
int  smoothStart,
int  smoothEnd 
)
Remarks
This method is available in release 3.0 and later only.

This method is used internally.
Point3 GetBevelDir ( int  patchVertID)
Remarks
This method is available in release 3.0 and later only.

This method is for internal use.
CoreExport void Attach ( PatchMesh attPatch,
int  mtlOffset 
)
CoreExport void ChangePatchInterior ( int  index,
int  type 
)
CoreExport void ChangeVertType ( int  index,
int  type 
)
CoreExport BOOL SelVertsSameType ( )
CoreExport BOOL SelPatchesSameType ( )
CoreExport BOOL ResetVertexTangents ( int  index)
CoreExport BOOL ResetVertexTangents ( bool  useSel = true,
const BitArray vSel = NULL 
)
CoreExport BOOL PatchSmoothVector ( bool  useSel = true,
const BitArray vSel = NULL 
)
CoreExport BOOL PatchSmoothVertex ( bool  useSel = true,
const BitArray vSel = NULL 
)
CoreExport BOOL PatchSmoothEdge ( bool  useSel = true,
const BitArray eSel = NULL 
)
CoreExport BOOL PatchSmoothPatch ( bool  useSel = true,
const BitArray pSel = NULL 
)
CoreExport void ShrinkSelection ( int  type)
CoreExport void GrowSelection ( int  type)
CoreExport void SelectEdgeRing ( BitArray eSel)
CoreExport void SelectEdgeLoop ( BitArray eSel)
CoreExport void Dump ( )
Remarks
This method may be called to dump the patch mesh structure via DebugPrint(). See Troubleshooting.
CoreExport void PrepareMesh ( )
CoreExport void PrepareUnrelaxedMesh ( )
CoreExport Mesh& GetMesh ( )
CoreExport Mesh& GetUnrelaxedMesh ( )
CoreExport void ComputeMesh ( Mesh m,
DWORD  convertFlags 
)
Remarks
This method is available in release 4.0 and later only.

This method will produce the mesh version of the PatchMesh.
Parameters:
Mesh& msh

The mesh in which the resulting mesh should be stored.

DWORD convertFlags

The flags modifying the mesh process.

PATCH_CONVERT_KEEPSEL

This flag indicates that the subobject vertex and patch selections in the PatchMesh should be converted to subobject vertex and face selections in the mesh.

PATCH_CONVERT_USESOFTSEL

This flag indicates that soft selections should be used in the mesh to interpolate between selected and nonselected vertices. (Soft Selections cannot be based on edge or patch selection in the PatchMesh, only vertex selection.)
CoreExport int IntersectRay ( Ray ray,
float &  at,
Point3 norm 
)
Remarks
This method is available in release 3.0 and later only.

Calculates the intersection of the specified ray with this patch mesh object. This method calls the method of the same name on the Mesh cache.
Parameters:
Ray& ray

Specifies the origin and direction of the ray to intersect with the patch mesh. See Class Ray.

float& at

The computed point of intersection on the surface of the patch mesh.

Point3& norm

The face normal at the point of intersection (at).
Returns
Nonzero if the ray intersected the mesh object; otherwise 0. Note that this method ignores backfaces when computing the result.
CoreExport IOResult Save ( ISave isave)
CoreExport IOResult Load ( ILoad iload)
CoreExport void AutoSmooth ( float  angle,
BOOL  useSel,
BOOL  preventIndirectSmoothing 
)
Remarks
This method is available in release 4.0 and later only.

This method will perform automatic smoothing on the patch mesh. The smoothing angle is determined for each patch by computing the normals at each corner of the patch (using the corner vertex and the two edge vectors connected to that vertex), then averaging the normals of the two corners of each edge to arrive at a normal for that edge. These normals are used to determine whether adjacent patches are within the auto-smooth threshold angle.
Parameters:
float angle

The minimum angle between surface normals for smoothing to be applied, in radians.

BOOL useSel

If this parameter is set to TRUE then only the selected patches are smoothed.

BOOL preventIndirectSmoothing

TRUE to turn on; FALSE to leave it off. This matches the option in the Smooth Modifier UI – use this to prevent smoothing 'leaks" when using this method. If you use this method, and portions of the patch mesh that should not be smoothed become smoothed, then try this option to see if it will correct the problem. Note that the problem it corrects is rare, and that checking this slows the automatic smoothing process.
CoreExport void ChangePatchToLinearMapping ( int  index)
Remarks
This method is available in release 4.0 and later only.

This method changes the mapping of a patch or all selected patches to linear.
Parameters:
int index

The index of the patch for which to change the mapping to linear. A value < 0 indicates all selected patches are to be changed to linear mapping.
CoreExport void ChangePatchToCurvedMapping ( int  index)
Remarks
This method is available in release 4.0 and later only.

This method changes the mapping of a patch or all selected patches to curved.
Parameters:
int index

The index of the patch for which to change the mapping to curved. A value < 0 indicates all selected patches are to be changed to curved mapping.
CoreExport BOOL ArePatchesLinearMapped ( int  index)
Remarks
This method is available in release 4.0 and later only.

This method will check if one or all selected patches have linear mapping applied.
Parameters:
int index

The index of the patch for which to check if mapping is linear. A value < 0 indicates all selected patches are checked for linear mapping.
Returns
TRUE if the specified patch or selected patches have linear mapping applied, otherwise FALSE.
CoreExport BOOL ArePatchesCurvedMapped ( int  index)
Remarks
This method is available in release 4.0 and later only.

This method will check if one or all selected patches have curved mapping applied.
Parameters:
int index

The index of the patch for which to check if mapping is curved. A value < 0 indicates all selected patches are checked for curved mapping.
Returns
TRUE if the specified patch or selected patches have curved mapping applied, otherwise FALSE.
CoreExport BOOL SingleEdgesOnly ( )
Remarks
This method is available in release 4.0 and later only.

This method examines the selected edges and will return TRUE if all selected edges are used by only one single patch. If the method returns FALSE, there are no edges selected or any of the selected edges are used by more than one single patch.
CoreExport BitArray& GetElement ( int  index)
Remarks
This method is available in release 4.0 and later only.

This method will return a BitArray that defines the group of patches defining an element that contains the patch indicated by the specified index. A PatchMesh element is any set of patches sharing common vertices.
Parameters:
int index

The patch index for which to return the element.
CoreExport BaseInterface* GetInterface ( Interface_ID  id)
virtual
Remarks
This method returns a pointer to the BaseInterface of the specified interface.
Parameters:
Interface_ID id

The interface ID for which to return the BaseInterface.

Reimplemented from BaseInterfaceServer.

CoreExport void SetVertexWeightCount ( int  i)
CoreExport void SetVertexWeight ( int  i,
float  w 
)
inline
2722 { assert( mpVertexWeights ); if ( i >= numVertexWeights ) return; mpVertexWeights[i] = w; }
#define assert(expr)
Definition: assert1.h:71
CoreExport float VertexWeight ( int  i)
inline
2723 { if ( !mpVertexWeights ) return 0.0f; if ( i >= numVertexWeights ) return 0.0f; return mpVertexWeights[i]; }
CoreExport bool VertexWeightSupport ( )
inline
2724 { if ( mpVertexWeights ) return true; return false; }
CoreExport float* GetVSelectionWeights ( )
inline
Remarks
This method is available in release 4.0 and later only.

This method provides direct access to the vertex weights array and is included to match a similar function in the Mesh class.
Returns
A pointer to the vertex weights array.
Default Implementation:
{ return mpVertexWeights; }
2735 { return mpVertexWeights; }
CoreExport void SupportVSelectionWeights ( )
Remarks
This method is available in release 4.0 and later only.

This method allocates a vertex weights array, if none is currently allocated. This method is included to match a similar function in the Mesh class.
CoreExport int VertexWeightSelectLevel ( )
inline
2744 { return mVertexWeightSelectLevel; }
CoreExport int UseEdgeDists ( )
CoreExport void SetUseEdgeDists ( int  edgeDist)
CoreExport int EdgeDist ( )
CoreExport void SetEdgeDist ( int  edgeDist)
CoreExport int UseSoftSelections ( )
CoreExport void SetUseSoftSelections ( int  useSoftSelections)
CoreExport int AffectBackface ( )
CoreExport void SetAffectBackface ( int  affectBackface)
CoreExport float Falloff ( )
CoreExport void SetFalloff ( float  falloff)
CoreExport float Pinch ( )
CoreExport void SetPinch ( float  pinch)
CoreExport float Bubble ( )
CoreExport void SetBubble ( float  bubble)
CoreExport void InvalidateVertexWeights ( )
CoreExport void UpdateVertexDists ( )
CoreExport void UpdateEdgeDists ( )
CoreExport void UpdateVertexWeights ( )
CoreExport Point3 VertexNormal ( int  vIndex)
CoreExport BOOL Relaxing ( )
CoreExport BOOL SetRelax ( BOOL  v)
CoreExport BOOL SetRelaxViewports ( BOOL  v)
CoreExport BOOL SetRelaxValue ( float  v)
CoreExport BOOL SetRelaxIter ( int  v)
CoreExport BOOL SetRelaxBoundary ( BOOL  v)
CoreExport BOOL SetRelaxSaddle ( BOOL  v)
CoreExport BOOL GetRelax ( )
CoreExport BOOL GetRelaxViewports ( )
CoreExport float GetRelaxValue ( )
CoreExport int GetRelaxIter ( )
CoreExport BOOL GetRelaxBoundary ( )
CoreExport BOOL GetRelaxSaddle ( )

Friends And Related Function Documentation

friend class Patch
friend

Member Data Documentation

int numVerts
int numVecs
int numPatches
int numEdges
Patch* patches
PatchVec* vecs
PatchEdge* edges
Tab<HookPoint> hooks
Tab<Point3> hookTopoMarkers
Tab<Point3> hookTopoMarkersA
Tab<Point3> hookTopoMarkersB
Point3* normals
BOOL normalsBuilt
PatchVert* verts
Tab<int> numTVerts
Tab<PatchTVert *> tVerts
Tab<TVPatch *> tvPatches
BitArray vecSel
BitArray vertSel
BitArray edgeSel
BitArray patchSel
int bezVecVert
DWORD dispFlags
DWORD selLevel
int cacheSteps
BOOL cacheAdaptive
BOOL unrelaxedMeshValid
BOOL relaxedMeshValid
Tab<Point3> extrudeDeltas
MaxSDK::Array<ExtrudeData> extrudeData
Tab<Point3> edgeNormals
Tab<int> newEdges
Tab<int> newVerts
BitArray bevelEdges
Tab<float> edgeDistances
float mFalloff
float mPinch
float mBubble
int mEdgeDist
int mUseEdgeDist
int mAffectBackface
int mUseSoftSelections