GEL  2
GEL is a library for Geometry and Linear Algebra
Public Member Functions
Geometry::IndexedFaceSet Class Reference

This class represents the simplest possible triangle mesh data structure. More...

#include <IndexedFaceSet.h>

List of all members.

Public Member Functions

int add_face (const CGLA::Vec3i &f, int idx=-1)
int no_faces () const
 Return the number of faces.
const CGLA::Vec3iface (size_t idx) const
CGLA::Vec3iface_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::Vec3fvertex (int idx) const
CGLA::Vec3fvertex_rw (int idx)
 Assign v to a vertex of index idx.

Detailed Description

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations