#include <freecloth/geom/geMeshBuilder.h>
Inheritance diagram for freecloth::GeMeshBuilder:
Public Types | |
typedef GeMesh::FaceConstIterator | FaceConstIterator |
ConstIterator for faces. | |
Public Member Functions | |
void | preallocVertices (UInt32) |
Reserve space for the given number of vertices. | |
void | preallocTextureVertices (UInt32) |
Reserve space for the given number of texture vertices. | |
void | preallocFaces (UInt32 nb) |
Reserve space for the given number of faces. | |
VertexId | addVertex (const VertexType &) |
Add a vertex to the mesh. Returns the id of the new vertex. | |
VertexId | addVertices (VertexConstIterator const &beginIt, VertexConstIterator const &endIt) |
Add the range [beginIt,endIt). Returns the id of the first vertex. | |
UInt32 | getNbVertices () const |
Retrieve number of vertices added to mesh so far. | |
const VertexType & | getVertex (VertexId) const |
Retrieve a vertex that has already been added. | |
TextureVertexId | addTextureVertex (const TextureVertexType &) |
TextureVertexId | addTextureVertices (TextureVertexConstIterator const &beginIt, TextureVertexConstIterator const &endIt) |
UInt32 | getNbTextureVertices () const |
Retrieve number of texture vertices added to mesh so far. | |
const TextureVertexType & | getTextureVertex (TextureVertexId) const |
Retrieve a texture vertex that has already been added. | |
FaceId | addFace (VertexId v1, VertexId v2, VertexId v3, TextureVertexId tv1, TextureVertexId tv2, TextureVertexId tv3) |
Add a face to the mesh. Returns the id of the new face. | |
FaceId | addFace (VertexId vids[GeMesh::FaceType::NB_VERTICES], TextureVertexId tvids[GeMesh::FaceType::NB_VERTICES]) |
Add a face to the mesh. Returns the id of the new face. | |
FaceId | addFaces (FaceConstIterator const &beginIt, FaceConstIterator const &endIt) |
Add the range [beginIt,endIt). Returns the id of the first face. | |
UInt32 | getNbFaces () const |
Retrieve number of faces added to mesh so far. | |
RCShdPtr< GeMesh > | createMesh () |
Vertices, texture vertices and faces can be added, and the mesh will be created with a final call to createMesh().
For added efficiency, the prealloc* routines can be called before the add* routines to reserve space for vertices, texture vertices or faces.
During construction, vertices and texture vertices are given temporary IDs and can be retrieved from the partially constructed mesh.
Pattern: Builder
Definition at line 58 of file geMeshBuilder.h.
|
Add a texture vertex to the mesh. Returns the id of the new texture vertex. Definition at line 94 of file geMeshBuilder.cpp. References freecloth::GeMeshTypes::TextureVertexId. |
|
Add the range [beginIt,endIt). Returns the id of the first texture vertex. Definition at line 105 of file geMeshBuilder.cpp. References freecloth::GeMeshTypes::TextureVertexId. |
|
Creates a GeMesh object using the vertices, texture vertices and faces added to the builder so far. Returns a pointer to the built GeMesh object. Subsequently, resets the builder in preparation for the construction of a new GeMesh object. Definition at line 191 of file geMeshBuilder.cpp. References FaceConstIterator, freecloth::GeMeshTypes::FaceVertexId, getNbVertices(), freecloth::GeMeshTypes::TextureVertexId, and freecloth::GeMeshTypes::VertexId. |