libmove3d
3.13.0
|
#include <gpConvexHull.h>
Public Member Functions | |
gpConvexHull3D (p3d_vector3 *point_array, unsigned int nbpoints) | |
int | setPoints (p3d_vector3 *point_array, unsigned int nbpoints) |
int | voronoi (bool verbose=true) |
int | draw (bool wireframe=false) |
int | drawFace (unsigned int face_index) |
Derives from gpConvexHull class to deal with 3D points. Adds a new constructor and display functions.
gpConvexHull3D::gpConvexHull3D | ( | p3d_vector3 * | point_array, |
unsigned int | nb_points | ||
) |
Initializes the input point set from the given p3d_vector3 array (with the same order so that, after hull computation, indices in hull_vertices and hull_faces correspond to the indices in point_array).
int gpConvexHull3D::draw | ( | bool | wireframe = false | ) |
Draws the current content of hull_vertices and hull_faces. NB: The colors are set inside the function.
wireframe | sets display mode (wireframe/solid) |
int gpConvexHull3D::drawFace | ( | unsigned int | face_index | ) |
Draws the hull face of given index. NB: The colors are set inside the function.
face_index | the index of the face in the face array of the calling gpConvexHull3D |
Reimplemented from gpConvexHull.
int gpConvexHull3D::voronoi | ( | bool | verbose = true | ) | [virtual] |
Computes the voronoi regions of the point set stored in the calling gpConvexHull3D variable. Compared to the version of the parent class, it just adds the computation of the ridge normals and how the ridge vertices are ordered.
Reimplemented from gpConvexHull.