|
GEL
2
GEL is a library for Geometry and Linear Algebra
|
A Triangle Mesh struct. More...
#include <TriMesh.h>
Public Member Functions | |
| bool | get_bbox (CGLA::Vec3f &p0, CGLA::Vec3f &p7) const |
| Get an axis aligned bounding box for the model. | |
| bool | get_bsphere (CGLA::Vec3f &c, float &r) const |
| Get a bounding sphere for the model. | |
| bool | has_normals () const |
| Returns true if at least one normal has been defined. | |
| int | find_material (const std::string &) const |
| Find a material from its name. | |
| void | compute_normals () |
| Compute normals for the mesh. Does not check if there are normals. | |
| void | transform (CGLA::Mat4x4f m) |
| Apply a transformation matrix to the mesh. | |
Public Attributes | |
| std::string | name |
| Name of model. | |
| IndexedFaceSet | geometry |
| Indexed face set for the actual geometry. | |
| IndexedFaceSet | normals |
| Indexed face set for the normals. | |
| IndexedFaceSet | texcoords |
| Indexed face set for the texture coordinates. | |
| std::vector< int > | mat_idx |
| Material indices for all faces. | |
| std::vector< int > | tex_idx |
| Texture indices for all faces. | |
| std::vector< Material > | materials |
| Vector of materials. | |
A Triangle Mesh struct.
This struct contains three indexed face sets, one for geometry, textures, and normals. It also contains a vector of materials and a vector of texture maps.
A number of functions are defined allowing for rendering of the triangle mesh.
1.7.5.1