Main Page   Class Hierarchy   Compound List   File List   Compound Members  

freecloth::GeMesh::FaceWrapper Class Reference

Facade class for access to face data, while drawing on information from the vertex and texture vertex arrays. More...

#include <freecloth/geom/geMesh.h>

Inheritance diagram for freecloth::GeMesh::FaceWrapper:

freecloth::GeMeshTypes List of all members.

Public Types

enum  { NB_VERTICES = 3 }

Public Member Functions

 FaceWrapper ()
 Construct invalid wrapper - mostly used by iterator classes.

 FaceWrapper (const GeMesh &, FaceId)
FaceId getFaceId () const
UInt32 getNbVertices () const
VertexId getVertexId (FaceVertexId) const
const VertexTypegetVertex (FaceVertexId) const
TextureVertexId getTextureVertexId (FaceVertexId) const
const TextureVertexTypegetTextureVertex (FaceVertexId) const
Float calcArea () const
 Calculate area of face.

GeVector calcNormal () const
 Calculate the normal for the face. Guaranteed to be a unit vector.

GePoint calcBarycentric (const GePoint &p) const

Friends

class GeMesh::FaceConstIterator
class GeMeshBuilder

Detailed Description

Facade class for access to face data, while drawing on information from the vertex and texture vertex arrays.

Each face contains indices into the vertex and texture vertex arrays. From the vertices, other information can be calculated.

At present, all faces are triangular.

Pattern: Facade

Definition at line 209 of file geMesh.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
NB_VERTICES  Maximum number of vertices in a face.

Definition at line 214 of file geMesh.h.


Member Function Documentation

GePoint freecloth::GeMesh::FaceWrapper::calcBarycentric const GePoint   p const
 

Calculate the barycentric co-ordinates of p.

Barycentric co-ordinates express p as a linear combination of the vertices of the face.

Definition at line 69 of file geMesh.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Apr 23 15:58:47 2003 for Freecloth by doxygen1.3-rc3