TVFace Class Reference

#include <mesh.h>

Class 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.
+ Inheritance diagram for TVFace:

Public Member Functions

 TVFace ()
 Constructor. More...
 
 TVFace (DWORD a, DWORD b, DWORD c)
 Constructor. More...
 
DllExport void setTVerts (DWORD *vrt)
 Sets the texture vertices. More...
 
void setTVerts (int a, int b, int c)
 Sets the textured vertices. More...
 
DWORD getTVert (int index)
 Retrieves one of the texture vertices. More...
 
DWORD * getAllTVerts (void)
 Returns a pointer to the array of texture vertices. More...
 
DllExport DWORD GetVertIndex (DWORD v0)
 Returns the index of the specified texture vertex in this texture face's vertex list (0, 1 or 2). More...
 
DllExport DWORD GetOtherIndex (DWORD v0, DWORD v1)
 Returns the first texture vertex in this texture face that isn't v0 or v1. More...
 
DllExport int Direction (DWORD v0, DWORD v1)
 Indicates the order in which vertices v0 and v1 appear in the texture face. More...
 
DllExport void OrderVerts (DWORD &v0, DWORD &v1)
 This method switches v0,v1 if needed to put them in face-order. More...
 

Public Attributes

DWORD t [3]
 These are indices into the mesh object's tVerts array. More...
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Constructor & Destructor Documentation

TVFace ( )
inline

Constructor.

No initialization is done.

365 {}
TVFace ( DWORD  a,
DWORD  b,
DWORD  c 
)
inline

Constructor.

Parameters
aSpecifies the index into the tVerts array for vertex 0.
bSpecifies the index into the tVerts array for vertex 1.
cSpecifies the index into the tVerts array for vertex 2.
371 {t[0]=a; t[1]=b; t[2]=c;}
DWORD t[3]
These are indices into the mesh object's tVerts array.
Definition: mesh.h:362

Member Function Documentation

DllExport void setTVerts ( DWORD *  vrt)

Sets the texture vertices.

Parameters
vrtAn 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
aSpecifies the index into the tVerts array for vertex 0.
bSpecifies the index into the tVerts array for vertex 1.
cSpecifies the index into the tVerts array for vertex 2.
382 { t[0]=a; t[1]=b; t[2]=c; }
DWORD t[3]
These are indices into the mesh object's tVerts array.
Definition: mesh.h:362
DWORD getTVert ( int  index)
inline

Retrieves one of the texture vertices.

Parameters
indexSpecifies the index of the texture vertex to retrieve. You may use 0, 1 or 2.
Returns
The texture vertex.
388 { return t[index]; }
DWORD t[3]
These are indices into the mesh object's tVerts array.
Definition: mesh.h:362
DWORD* getAllTVerts ( void  )
inline

Returns a pointer to the array of texture vertices.

392 { return t; }
DWORD t[3]
These are indices into the mesh object's tVerts array.
Definition: mesh.h:362
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
v0The 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
v0The zero based index of one of the vertices to check.
v1The 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
v0One vertex on this texture face.
v1Another 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
v0One vertex on this texture face.
v1Another vertex on this texture face.

Member Data Documentation

DWORD t[3]

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