ScEng::PolyFace Class Reference

Describes a polygonal face. More...

#include <polymesh.h>

List of all members.

Public Types

enum  FLAGS { USER = (1<<16) }

Public Member Functions

 PolyFace ()
 ~PolyFace ()
 Destructor.
void SetEdgeVisibility (int i, bool vis)
 Sets the visibility for a specified edge.
void SetDeg (int degree)
void DeleteData ()
void SetVerts (int i_v, int vert)
void SetMaterialID (unsigned short m_id)
 Sets the material ID for this face.
void SetSmoothingGroups (unsigned int sg)
 Sets the smoothing group for this face.
void SetNumTriangulation (int nt)
void SetTriangulationID (int i, int id)
void SetTriangulation (std::vector< int > &triangles)
void ReplaceVert (int ov, int nv)
void DeleteThis ()
 Deletes this class.
unsigned int GetSmoothingGroup ()
 Returns the smoothing group for this face.
unsigned short GetMaterialID ()
 Returns the material id for this face.
PolyFaceoperator= (const PolyFace &pf)
 Assignment operator.

Public Attributes

unsigned short material_id
 The id for the material used by this face.
unsigned int smoothing_groups
 The smoothing group for this face.
int * v
 The array with the indexes used by this face.
unsigned int * edge_flags
 A bitarray that stores the hard or smooth flags for each edge of the face.
unsigned short deg
unsigned short num_triangulation
 The number of the elements in the triangulation data array.
unsigned short * triangulation
 The array that holds the triangulation indexes.
int user_data
 Variable reserved for the user.


Detailed Description

Describes a polygonal face.

Please add comments here


Member Enumeration Documentation

enum ScEng::PolyFace::FLAGS

Enum FLAGS Enum all the possible states for this PolyFace

Enumerator:
USER  User flags


Constructor & Destructor Documentation

ScEng::PolyFace::PolyFace (  ) 

Constructor Sets the verts and triangulation array to NULL


Member Function Documentation

void ScEng::PolyFace::SetEdgeVisibility ( int  i,
bool  vis 
)

Sets the visibility for a specified edge.

Parameters:
i the index for the edge
vis the boolean value for the visibility of this edge
See also:
SetEdgesVisibility( bool e0, bool e1, bool e2 )

void ScEng::PolyFace::SetDeg ( int  degree  ) 

Sets the degree for this face Deletes the current data and generate a new vertex array, using the given degree.

Parameters:
degree the new degree for this face

void ScEng::PolyFace::DeleteData (  ) 

Deletes the data of this face Deletes the triangulation and verts arrays, and sets the number of verts and the number of triangulation to 0.

void ScEng::PolyFace::SetVerts ( int  i_v,
int  vert 
)

Sets a vert

Parameters:
i_v the index for the verts in the verts array
vert the ID for the vert

void ScEng::PolyFace::SetNumTriangulation ( int  nt  ) 

Sets the number of triangulation for this face Deletes the current data and generate a new triangulation array, using the given argument.

Parameters:
nt the new number of triangulation for this face

void ScEng::PolyFace::SetTriangulationID ( int  i,
int  id 
)

Sets a triangulation ID

Parameters:
i the index for the triangulation in the triangulation array
id the ID for the triangulation

void ScEng::PolyFace::SetTriangulation ( std::vector< int > &  triangles  ) 

Sets the triangulation for this face using an integer vector. param triangles The size of the triangulations is set to triangles.size() and the ids to the elements of the vector.

void ScEng::PolyFace::ReplaceVert ( int  ov,
int  nv 
)

Replaces a vertex This method receives the index of the old vertex and the index of the new vertex and searches in all the vertices and replaces the old one with the new one.

Parameters:
ov the old vertex to be replaced
nv the new vertex to replace the old


Member Data Documentation

unsigned short ScEng::PolyFace::deg

The degree for this face The degree indicates the number of verts for this face


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