Detailed Description
This module implements some classes to compute the convex hull of a point set (in arbitrary dimension). It is based on qhull( http://www.qhull.org/).
Function Documentation
int gpSample_polyhedron_convex_hull |
( |
p3d_polyhedre * |
polyhedron, |
|
|
double |
step, |
|
|
std::vector< gpVector3D > & |
samples |
|
) |
| |
Computes sample points inside the convex hull of the vertices of a p3d_polyhedre. A grid is first computed inside an axis-aligned bounding box of the polyhedron. All the points that are outside the convex hull are then removed. The function also computes the distance from each sample to the hull (the distance value is copied in the cost field of the samples)
- Parameters:
-
polyhedron | pointer to the p3d_polyhedre |
step | resolution of the grid |
samples | the computed number of samples |
- Returns:
- GP_OK in case of success, GP_ERROR otherwise