GEL
2
GEL is a library for Geometry and Linear Algebra
|
Polygonizer is the class used to perform polygonization. More...
#include <Polygonizer.h>
Public Member Functions | |
Polygonizer (ImplicitFunction *_func, float _size, int _bounds, bool _use_tetra=false, bool _use_normals=false) | |
void | march (float x, float y, float z) |
int | no_triangles () const |
int | no_vertices () const |
int | no_normals () const |
TRIANGLE & | get_triangle (int i) |
Return triangle with index i. | |
VERTEX & | get_vertex (int i) |
Return vertex with index i. | |
NORMAL & | get_normal (int i) |
Return normal with index i. |
Polygonizer is the class used to perform polygonization.
Geometry::Polygonizer::Polygonizer | ( | ImplicitFunction * | _func, |
float | _size, | ||
int | _bounds, | ||
bool | _use_tetra = false , |
||
bool | _use_normals = false |
||
) | [inline] |
Constructor of Polygonizer. The first argument is the ImplicitFunction that we wish to polygonize. The second argument is the size of the polygonizing cell. The third arg. is the limit to how far away we will look for components of the implicit surface. the fourth argument indicates whether the polygonizing cell is a tetrahedron (true) or cube (false). The final argument indicates whether normals should be computed.
void Geometry::Polygonizer::march | ( | float | x, |
float | y, | ||
float | z | ||
) |
March erases the triangles gathered so far and builds a new polygonization. The x,y,z arguments indicate a point near the surface.
int Geometry::Polygonizer::no_normals | ( | ) | const [inline] |
Return number of normals generated after the polygonization. Of course the result of calling this function is the same as no_vertices. Call this function only when march has been called.
int Geometry::Polygonizer::no_triangles | ( | ) | const [inline] |
Return number of triangles generated after the polygonization. Call this function only when march has been called.
int Geometry::Polygonizer::no_vertices | ( | ) | const [inline] |
Return number of vertices generated after the polygonization. Call this function only when march has been called.