libmove3d  3.13.0
Public Member Functions
gpConvexHull3D Class Reference

#include <gpConvexHull.h>

Inheritance diagram for gpConvexHull3D:
gpConvexHull

List of all members.

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)

Detailed Description

Derives from gpConvexHull class to deal with 3D points. Adds a new constructor and display functions.


Constructor & Destructor Documentation

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).


Member Function Documentation

int gpConvexHull3D::draw ( bool  wireframe = false)

Draws the current content of hull_vertices and hull_faces. NB: The colors are set inside the function.

Parameters:
wireframesets display mode (wireframe/solid)
Returns:
GP_OK in case of success, GP_ERROR otherwise
int gpConvexHull3D::drawFace ( unsigned int  face_index)

Draws the hull face of given index. NB: The colors are set inside the function.

Parameters:
face_indexthe index of the face in the face array of the calling gpConvexHull3D
Returns:
GP_OK in case of success, GP_ERROR otherwise

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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines