Class TVPatch

3DS Max Plug-In SDK

Class TVPatch

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

class TVPatch

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:

public:

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.

Methods:

Prototype:

TVPatch();

Remarks:

Constructor.

Prototype:

TVPatch(TVPatch& fromPatch);

Remarks:

Constructor. The this pointer is set to the fromPatch.

Prototype:

void Init();

Remarks:

Performs initialization by setting the texture vertices to 0.

Prototype:

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.

Prototype:

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;

Prototype:

int getTVert(int index);

Remarks:

Returns the texture vertex specified by the index.

Parameters:

int index

The index of the texture vertex to return.

Prototype:

int *getAllTVerts();

Remarks:

Returns a pointer to the array of texture vertices.

Prototype:

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.

Prototype:

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;

Prototype:

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.

Prototype:

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;

Prototype:

IOResult Save(ISave *isave);

Remarks:

This method is used internally in saving to the MAX file.

Prototype:

IOResult Load(ILoad *iload);

Remarks:

This method is used internally in loading from the MAX file.

Operators:

Prototype:

TVPatch& operator=(const TVPatch& from);

Remarks:

Assignment operator.

Parameters:

TVPatch& from

The texture vertex patch to copy from.