This reference page is linked to from the following overview topics: Principal Classes, Patch Code Example, Mesh Related Classes, Vertex Color Information.
#include <mesh.h>
This class is used for texture faces as well as vertex colors.
The class maintains an array of three indices into the object's tVerts array. See the Mesh class for details on how its array of TVFaces and tVerts relate. All methods of this class are implemented by the system.
Public Member Functions |
|
TVFace () | |
Constructor. |
|
TVFace (DWORD a, DWORD b, DWORD c) | |
Constructor. |
|
DllExport void | setTVerts (DWORD *vrt) |
Sets the texture vertices. |
|
void | setTVerts (int a, int b, int c) |
Sets the textured vertices. |
|
DWORD | getTVert (int index) |
Retrieves one of the texture vertices.
|
|
DWORD * | getAllTVerts (void) |
Returns a pointer to the array of texture
vertices. |
|
DllExport DWORD | GetVertIndex (DWORD v0) |
Returns the index of the specified texture
vertex in this texture face's vertex list (0, 1 or 2). |
|
DllExport DWORD | GetOtherIndex (DWORD v0, DWORD v1) |
Returns the first texture vertex in this
texture face that isn't v0 or v1. |
|
DllExport int | Direction (DWORD v0, DWORD v1) |
Indicates the order in which vertices v0 and
v1 appear in the texture face. |
|
DllExport void | OrderVerts (DWORD &v0, DWORD &v1) |
This method switches v0,v1 if needed to put
them in face-order. |
|
Public Attributes |
|
DWORD | t [3] |
These are indices into the mesh object's
tVerts array. |
TVFace | ( | ) | [inline] |
Constructor.
No initialization is done.
{}
TVFace | ( | DWORD | a, |
DWORD | b, | ||
DWORD | c | ||
) | [inline] |
DllExport void setTVerts | ( | DWORD * | vrt | ) |
Sets the texture vertices.
vrt | An array of indices into the tVerts array for vertices 0, 1, and 2. |
void setTVerts | ( | int | a, |
int | b, | ||
int | c | ||
) | [inline] |
Sets the textured vertices.
a | Specifies the index into the tVerts array for vertex 0. |
b | Specifies the index into the tVerts array for vertex 1. |
c | Specifies the index into the tVerts array for vertex 2. |
DWORD getTVert | ( | int | index | ) | [inline] |
Retrieves one of the texture vertices.
index | Specifies the index of the texture vertex to retrieve. You may use 0, 1 or 2. |
{ return t[index]; }
DWORD* getAllTVerts | ( | void | ) | [inline] |
DllExport DWORD GetVertIndex | ( | DWORD | v0 | ) |
Returns the index of the specified texture vertex in this texture face's vertex list (0, 1 or 2).
If not found 3 is returned.
v0 | The zero based index of the texture vertex to check. |
DllExport DWORD GetOtherIndex | ( | DWORD | v0, |
DWORD | v1 | ||
) |
Returns the first texture vertex in this texture face that isn't v0 or v1.
v0 | The zero based index of one of the vertices to check. |
v1 | The zero based index of the other vertex to check. |
DllExport int Direction | ( | DWORD | v0, |
DWORD | v1 | ||
) |
Indicates the order in which vertices v0 and v1 appear in the texture face.
v0 | One vertex on this texture face. |
v1 | Another vertex on this texture face. |
DllExport void OrderVerts | ( | DWORD & | v0, |
DWORD & | v1 | ||
) |
This method switches v0,v1 if needed to put them in face-order.
If v0 and v1 are in the order in which they appear in the texture face, or if one or both of them are not actually on the texture face, nothing happens. If however v0 follows v1, the values of the parameters are switched, so that they are then in the correct order for this texture face.
v0 | One vertex on this texture face. |
v1 | Another vertex on this texture face. |
DWORD t[3] |
These are indices into the mesh object's tVerts array.