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 Methods

 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
 Calculate the barycentric co-ordinates of p. Barycentric co-ordinates express p as a linear combination of the vertices of the face.


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 210 of file geMesh.h.


Member Enumeration Documentation

anonymous enum
 

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

Definition at line 215 of file geMesh.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 13:04:26 2003 for Freecloth by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002