GEL
2
GEL is a library for Geometry and Linear Algebra
|
This class represents the simplest possible triangle mesh data structure. More...
#include <IndexedFaceSet.h>
Public Member Functions | |
int | add_face (const CGLA::Vec3i &f, int idx=-1) |
int | no_faces () const |
Return the number of faces. | |
const CGLA::Vec3i & | face (size_t idx) const |
CGLA::Vec3i & | face_rw (int idx) |
Assign f to a face of index idx. | |
int | add_vertex (const CGLA::Vec3f &v) |
Add a vertex and return the index of the vertex. | |
int | no_vertices () const |
Return the number of vertices. | |
const CGLA::Vec3f & | vertex (int idx) const |
CGLA::Vec3f & | vertex_rw (int idx) |
Assign v to a vertex of index idx. |
This class represents the simplest possible triangle mesh data structure.
Faces must be triangular, and 3D coordinates are the only values associated with the vertices.
int Geometry::IndexedFaceSet::add_face | ( | const CGLA::Vec3i & | f, |
int | idx = -1 |
||
) | [inline] |
Add a face and return the index of the new face.
If the optional idx argument is present, the face array is resized so that the new index == idx.
const CGLA::Vec3i& Geometry::IndexedFaceSet::face | ( | size_t | idx | ) | const [inline] |
Return the face corresponding to a given index.
The NULL_FACE is returned if the index is out of bounds.
const CGLA::Vec3f& Geometry::IndexedFaceSet::vertex | ( | int | idx | ) | const [inline] |
Return the vertex corresponding to a given index.
User is responsible for bounds checking.