Main Page   Class Hierarchy   Compound List   File List   Compound Members  

freecloth::GeMesh Class Reference

A class for triangle meshes. More...

#include <freecloth/geom/geMesh.h>

Inheritance diagram for freecloth::GeMesh:

freecloth::RCBase freecloth::GeMeshTypes List of all members.

Public Types

typedef FaceWrapper FaceType
 Facade for faces.


Public Member Functions

UInt32 getNbFaces () const
FaceType getFace (FaceId) const
FaceConstIterator beginFace () const
FaceConstIterator endFace () const
UInt32 getNbVertices () const
const VertexTypegetVertex (VertexId) const
VertexTypegetVertex (VertexId)
const VertexTypegetVertexArray () const
VertexIterator beginVertex ()
VertexIterator endVertex ()
VertexConstIterator beginVertex () const
VertexConstIterator endVertex () const
bool hasTexture () const
UInt32 getNbTextureVertices () const
const TextureVertexTypegetTextureVertex (TextureVertexId) const
TextureVertexTypegetTextureVertex (TextureVertexId)
const TextureVertexTypegetTextureVertexArray () const
TextureVertexIterator beginTextureVertex ()
TextureVertexIterator endTextureVertex ()
TextureVertexConstIterator beginTextureVertex () const
TextureVertexConstIterator endTextureVertex () const

Friends

class FaceWrapper
class GeMeshBuilder

Detailed Description

A class for triangle meshes.

A mesh is represented by vertices, texture vertices and faces. Vertices and texture vertices are stored in arrays, and faces use array indices (VertexId, TextureVertexId) to refer to vertices. A mesh with no texture vertices is considered to have no texture.

Must be constructed by GeMeshBuilder. Allows changes to geometry (vertices, texture vertices) after construction, but does not allow changes to topology (faces).

Retrieval and storage of faces is a little odd. Faces are stored as GeMesh::Face objects, containing only face data. Clients are presented with the alternate GeMesh::FaceWrapper class, which is given access to vertex and texture vertex data; this is more useful for client use. (Design pattern: facade.) A special iterator class allows iteration over the faces using FaceWrappers.

A winged-edge representation can be built with GeMeshWingedEdge. This representation allows better traversal of the mesh topology, but has too much overhead for everyday use.

Definition at line 79 of file geMesh.h.


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