#include <freecloth/geom/geMesh.h>
Inheritance diagram for GeMesh:
Public Types | |
typedef FaceWrapper | FaceType |
Facade for faces. | |
Public Methods | |
UInt32 | getNbFaces () const |
FaceType | getFace (FaceId) const |
FaceConstIterator | beginFace () const |
FaceConstIterator | endFace () const |
UInt32 | getNbVertices () const |
const VertexType & | getVertex (VertexId) const |
VertexType & | getVertex (VertexId) |
const VertexType * | getVertexArray () const |
VertexIterator | beginVertex () |
VertexIterator | endVertex () |
VertexConstIterator | beginVertex () const |
VertexConstIterator | endVertex () const |
bool | hasTexture () const |
UInt32 | getNbTextureVertices () const |
const TextureVertexType & | getTextureVertex (TextureVertexId) const |
TextureVertexType & | getTextureVertex (TextureVertexId) |
const TextureVertexType * | getTextureVertexArray () const |
TextureVertexIterator | beginTextureVertex () |
TextureVertexIterator | endTextureVertex () |
TextureVertexConstIterator | beginTextureVertex () const |
TextureVertexConstIterator | endTextureVertex () const |
Private Types | |
typedef std::vector< Face > | FaceContainer |
Private Methods | |
GeMesh () | |
Private Attributes | |
FaceContainer | _faces |
VertexContainer | _vertices |
TextureVertexContainer | _textureVertices |
Friends | |
class | FaceWrapper |
class | GeMeshBuilder |
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.