Public Member Functions | Public Attributes

TVPatch Class Reference

Search for all occurrences

Detailed Description

See also:
Class Patch, Class PatchMesh, Working with Patches.

Description:
This is a texture vertex patch structure. This is similar to the TVFace class used with a Mesh. All methods of this class are implemented by the system.
Data Members:
int tv[4];

Texture vertices. There are always four here, even for Tri Patches. These are indices in the PatchMesh's tVerts array.

int handles[8];

The UVW vertices for the handles.

int interiors[4];

The UVW interior handles.

#include <patch.h>

Inheritance diagram for TVPatch:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport  TVPatch ()
CoreExport  TVPatch (const TVPatch &fromPatch)
CoreExport void  Init ()
CoreExport void  setTVerts (int *vrt, int count)
CoreExport void  setTVerts (int a, int b, int c, int d=0)
CoreExport void  setTHandles (int *vrt, int count)
CoreExport void  setTHandles (int a, int b, int c, int d, int e, int f, int g=0, int h=0)
CoreExport void  setTInteriors (int *vrt, int count)
CoreExport void  setTInteriors (int a, int b, int c, int d=0)
int  getTVert (int index)
int *  getAllTVerts (void)
CoreExport TVPatch operator= (const TVPatch &from)
CoreExport IOResult  Save (ISave *isave)
CoreExport IOResult  Load (ILoad *iload)

Public Attributes

int  tv [4]
int  handles [8]
int  interiors [4]

Constructor & Destructor Documentation

CoreExport TVPatch ( )
Remarks:
Constructor.
CoreExport TVPatch ( const TVPatch fromPatch )
Remarks:
Copy Constructor. The this pointer is set to the fromPatch.

Member Function Documentation

CoreExport void Init ( )
Remarks:
Performs initialization by setting the texture vertices to 0.
CoreExport void setTVerts ( int *  vrt,
int  count 
)
Remarks:
Sets the specified number of texture vertices.
Parameters:
int *vrt

The array of verts to set.

int count

The number to set.
CoreExport void setTVerts ( int  a,
int  b,
int  c,
int  d = 0 
)
Remarks:
Sets the texture vertices for a Quad Patch.
Parameters:
int a, int b, int c, int d = 0

The vertices to set: tv[0]=a; tv[1]=b; tv[2]=c; tv[3]=d;
CoreExport void setTHandles ( int *  vrt,
int  count 
)
Remarks:
Sets the specified number of texture (UVW) handles.
Parameters:
int *vrt

The array of handles to set.

int count

The number to set.
CoreExport void setTHandles ( int  a,
int  b,
int  c,
int  d,
int  e,
int  f,
int  g = 0,
int  h = 0 
)
Remarks:
Sets the texture (UVW) handles for a Quad Patch.
Parameters:
int a, int b, int c, int d, int e, int f, int g = 0, int h = 0

The handles to set: handles[0]=a; handles[1]=b; handles[2]=c; handles[3]=d; handles[4]=e; handles[5]=f; handles[6]=g; handles[7]=h;
CoreExport void setTInteriors ( int *  vrt,
int  count 
)
Remarks:
Sets the specified number of interior texture (UVW) handles.
Parameters:
int *vrt

The array of interior handles to set.

int count

The number to set.
CoreExport void setTInteriors ( int  a,
int  b,
int  c,
int  d = 0 
)
Remarks:
Sets the interior texture (UVW) handles for a Quad Patch.
Parameters:
int a, int b, int c, int d = 0

The interior handles to set: interiors[0]=a; interiors[1]=b; interiors[2]=c; interiors[3]=d;
int getTVert ( int  index ) [inline]
Remarks:
Returns the texture vertex specified by the index.
Parameters:
int index

The index of the texture vertex to return.
{ return tv[index]; }
int* getAllTVerts ( void  ) [inline]
Remarks:
Returns a pointer to the array of texture vertices.
{ return tv; }
CoreExport TVPatch& operator= ( const TVPatch from )
Remarks:
Assignment operator.
Parameters:
TVPatch& from

The texture vertex patch to copy from.
CoreExport IOResult Save ( ISave isave )
Remarks:
This method is used internally in saving to the MAX file.
CoreExport IOResult Load ( ILoad iload )
Remarks:
This method is used internally in loading from the MAX file.
Operators:

Member Data Documentation

int tv[4]
int handles[8]
int interiors[4]

TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch
TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch TVPatch