HDK
|
#include <GU_ConvexHull3D.h>
Public Member Functions | |
void | computeAndShrink (fpreal shrink_amount, const UT_Vector3D *points, int npoints, bool remove_inline) |
void | computeAndShrink (fpreal shrink_amount, const UT_Vector3DArray &points, bool remove_inline) |
void | computeAndShrink (fpreal shrink_amount, const GU_Detail &src_gdp, const GA_PointGroup *src_grp, bool remove_inline) |
void | expand (fpreal expand_amount) |
Expands the convex hull outwards by the given amount. More... | |
void | transform (const UT_Matrix4D &xform) |
Transforms the convex hull points. More... | |
void | getGeometry (GU_Detail &gdp, const GU_Detail *src_gdp=nullptr, const GA_PointGroup *src_grp=nullptr) const |
const UT_Array< UT_Vector3D > & | getPoints () const |
Returns a list of the points in the convex hull. More... | |
const UT_Array< int > & | getPointSources () const |
Returns the source point index for each point in the convex hull. More... | |
const GEO_PolyCounts & | getPolygonSizes () const |
Returns a list of the polygons in the convex hull. More... | |
const UT_Array< int > & | getVertices () const |
Utility for computing (and optionally expanding or shrinking) convex hulls. This uses Bullet's convex hull algorithm (btConvexHullComputer).
Definition at line 29 of file GU_ConvexHull3D.h.
void GU_ConvexHull3D::computeAndShrink | ( | fpreal | shrink_amount, |
const UT_Vector3D * | points, | ||
int | npoints, | ||
bool | remove_inline | ||
) |
Computes the convex hull of the given point cloud.
shrink_amount | If greater than zero, each face will be moved towards the center along its normal by this amount. The value will be clamped to not exceed the minimum distance of any face to the center of the convex hull. |
|
inline |
Definition at line 39 of file GU_ConvexHull3D.h.
void GU_ConvexHull3D::computeAndShrink | ( | fpreal | shrink_amount, |
const GU_Detail & | src_gdp, | ||
const GA_PointGroup * | src_grp, | ||
bool | remove_inline | ||
) |
Calls computeAndShrink() with the point positions from the given detail.
Expands the convex hull outwards by the given amount.
void GU_ConvexHull3D::getGeometry | ( | GU_Detail & | gdp, |
const GU_Detail * | src_gdp = nullptr , |
||
const GA_PointGroup * | src_grp = nullptr |
||
) | const |
Appends the convex hull's geometry to the given detail, optionally copying attributes from the corresponding points in the source detail.
|
inline |
Returns a list of the points in the convex hull.
Definition at line 61 of file GU_ConvexHull3D.h.
Returns the source point index for each point in the convex hull.
Definition at line 64 of file GU_ConvexHull3D.h.
|
inline |
Returns a list of the polygons in the convex hull.
Definition at line 67 of file GU_ConvexHull3D.h.
Returns a list of the vertices. Use getPolygonSizes() to iterate over the polygons.
Definition at line 71 of file GU_ConvexHull3D.h.
void GU_ConvexHull3D::transform | ( | const UT_Matrix4D & | xform | ) |
Transforms the convex hull points.