HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_ConvexHull3D Class Reference

#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_PolyCountsgetPolygonSizes () const
 Returns a list of the polygons in the convex hull. More...
 
const UT_Array< int > & getVertices () const
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
shrink_amountIf 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.
void GU_ConvexHull3D::computeAndShrink ( fpreal  shrink_amount,
const UT_Vector3DArray points,
bool  remove_inline 
)
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.

void GU_ConvexHull3D::expand ( fpreal  expand_amount)

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.

const UT_Array<UT_Vector3D>& GU_ConvexHull3D::getPoints ( ) const
inline

Returns a list of the points in the convex hull.

Definition at line 61 of file GU_ConvexHull3D.h.

const UT_Array<int>& GU_ConvexHull3D::getPointSources ( ) const
inline

Returns the source point index for each point in the convex hull.

Definition at line 64 of file GU_ConvexHull3D.h.

const GEO_PolyCounts& GU_ConvexHull3D::getPolygonSizes ( ) const
inline

Returns a list of the polygons in the convex hull.

Definition at line 67 of file GU_ConvexHull3D.h.

const UT_Array<int>& GU_ConvexHull3D::getVertices ( ) const
inline

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.


The documentation for this class was generated from the following file: