ScEng::TriUVWMesh Class Reference

A triangular mesh to hold the UVW data. More...

#include <trimesh.h>

List of all members.

Public Types

enum  DATA { TRIUVWMESH_UVW = 100, COLOR = 200, USER = 300 }
 Enum Data. More...
enum  FLAGS { USER_FLAGS = (1<<16) }
 Enum FLAGS. More...

Public Member Functions

 TriUVWMesh ()
 Constructor.
void SetNumTVerts (int nv)
 Sets the number of tverts.
int GetNumTVerts ()
 Returns the number of tverts.
void SetTVert (int i_v, float u, float v, float w)
 Sets a tvert.
void SetTVert (int i_v, GMT::Point3F uvw)
 Sets a tvert.
GMT::Point3F GetTVertPosition (int i_v)
 Retunrs the position for the specific tvert.
Vert GetTVert (int i_v)
 Returns the specific tvert.
void SetNumTFaces (int nf)
 Sets the number of tfaces.
int GetNumTFaces ()
 Returns the number of tfaces.
void SetTFace (int i_f, int v0, int v1, int v2)
 Sets a TFace.
void SetTFace (int i_f, TriUVWFace tface)
 Sets a TFace.
void SetTFace (int i_f, int id, int v)
 Sets one tvert for a specific tface.
TriUVWFace GetTFace (int i_f)
 Returns the specified Tface.
void DeleteTangents ()
 Deletes all the tangent space data.
int AppendVerts (std::vector< GMT::Point3F > &new_tverts)
void DeleteThis ()
 Deletes this class.
int Save (SceneSave *scene_save)
 Saves the info for this class.
int Load (SceneLoad *scene_load)
 Loadas the info for this class.

Public Attributes

int flags
 Please add comments here.
int num_tverts
 The number of texture vertices for this UVW mesh.
int num_tfaces
 The number of texture faces for this UVW mesh.
Verttverts
 The array of texture vertices.
TriUVWFacetfaces
 The array of texture faces.
int num_tangents
 The number of uvw tangents in this mesh.
GMT::Point3F * tangents
 The array of tangents.
GMT::Point3F * normals
 The array of normals.


Detailed Description

A triangular mesh to hold the UVW data.

Please add comments here


Member Enumeration Documentation

enum ScEng::TriUVWMesh::DATA

Enum Data.

Please add comments here

Enumerator:
TRIUVWMESH_UVW  Please add comments here
COLOR  Please add comments here
USER  Please add comments here

enum ScEng::TriUVWMesh::FLAGS

Enum FLAGS.

Enum all the possible states for this TriUVWMesh

Enumerator:
USER_FLAGS  User flags


Constructor & Destructor Documentation

ScEng::TriUVWMesh::TriUVWMesh (  ) 

Constructor.

Sets the tverts and tfaces arrays to NULL.


Member Function Documentation

void ScEng::TriUVWMesh::SetNumTVerts ( int  nv  ) 

Sets the number of tverts.

Deletes the current vertex info, sets the number of tverts and allocates the memory for the tverts array.

Parameters:
nv the new number of tverts

void ScEng::TriUVWMesh::SetTVert ( int  i_v,
float  u,
float  v,
float  w 
)

Sets a tvert.

Parameters:
i_v the index for the tvert
u the U position for the tvert
v the V position for the tvert
w the W position for the tvert
See also:
SetTVert( int i_v, GMT::Point3F uvw )

void ScEng::TriUVWMesh::SetTVert ( int  i_v,
GMT::Point3F  uvw 
)

Sets a tvert.

Parameters:
i_v the index for the tvert
uvw the position of the vert
See also:
SetTVert(int i_v,float u,float v,float w)

GMT::Point3F ScEng::TriUVWMesh::GetTVertPosition ( int  i_v  ) 

Retunrs the position for the specific tvert.

Parameters:
i_v the index for the tvert in the tverts array
Returns:
The position of the tvert
See also:
GetTVert(int i_v)

Vert ScEng::TriUVWMesh::GetTVert ( int  i_v  ) 

Returns the specific tvert.

Parameters:
i_v the index for the tvert in the tverts array
Returns:
Returns the specified Vert
See also:
GetTVertPosition(int i_v)

void ScEng::TriUVWMesh::SetNumTFaces ( int  nf  ) 

Sets the number of tfaces.

Deletes the current faces info, sets the number of tfaces and allocates the memory for the tfaces array.

Parameters:
nf the new number of tfaces

void ScEng::TriUVWMesh::SetTFace ( int  i_f,
int  v0,
int  v1,
int  v2 
)

Sets a TFace.

Parameters:
i_f the index for the face
v0 the first vertex used by this face
v1 the second vertex used by this face
v2 the third vertex used by this face

void ScEng::TriUVWMesh::SetTFace ( int  i_f,
TriUVWFace  tface 
)

Sets a TFace.

Parameters:
i_f the index for the face
tface the new face to be set

void ScEng::TriUVWMesh::SetTFace ( int  i_f,
int  id,
int  v 
)

Sets one tvert for a specific tface.

Parameters:
i_f the index for the face
id the index of the vertex in the face's verts array
v the index for the vert in the UVWMesh verts array

int ScEng::TriUVWMesh::AppendVerts ( std::vector< GMT::Point3F > &  new_tverts  ) 

Append new verts

Parameters:
new_verts the verts to be appended
Returns:
Return the index for the first vertex appended


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 10:49:23 2007 for SceneEngine by  doxygen 1.5.1-p1