Public Member Functions | Public Attributes

TVFace Class Reference

This reference page is linked to from the following overview topics: Mesh Related Classes, Vertex Color Information, Principal Classes.


Search for all occurrences

Detailed Description

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.

See also:
Class Mesh.

#include <mesh.h>

Inheritance diagram for TVFace:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

TVFace ( ) [inline]

Constructor.

No initialization is done.

{}
TVFace ( DWORD  a,
DWORD  b,
DWORD  c 
) [inline]

Constructor.

Parameters:
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.
{t[0]=a; t[1]=b; t[2]=c;}

Member Function Documentation

DllExport void setTVerts ( DWORD *  vrt )

Sets the texture vertices.

Parameters:
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.

Parameters:
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.
{ t[0]=a; t[1]=b; t[2]=c; } 
DWORD getTVert ( int  index ) [inline]

Retrieves one of the texture vertices.

Parameters:
index Specifies the index of the texture vertex to retrieve. You may use 0, 1 or 2.
Returns:
The texture vertex.
{ return t[index]; }
DWORD* getAllTVerts ( void  ) [inline]

Returns a pointer to the array of texture vertices.

{ return t; }
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.

Parameters:
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.

Parameters:
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.

Parameters:
v0 One vertex on this texture face.
v1 Another vertex on this texture face.
Returns:
1 if v1 follows v0 in sequence. -1 if v0 follows v1 in sequence. 0 if v0 or v1 are not on the 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.

Parameters:
v0 One vertex on this texture face.
v1 Another vertex on this texture face.

Member Data Documentation

DWORD t[3]

These are indices into the mesh object's tVerts array.


TVFace TVFace TVFace TVFace TVFace TVFace TVFace TVFace TVFace TVFace
TVFace TVFace TVFace TVFace TVFace TVFace TVFace TVFace TVFace TVFace