HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_ConvexHullHalfPlanesT< T > Class Template Reference

#include <GU_ConvexHull3D.h>

Public Member Functions

 GU_ConvexHullHalfPlanesT (const UT_Array< UT_PlaneT< T >> &planes)
 Directly build from a set of directed half planes. More...
 
 GU_ConvexHullHalfPlanesT (const UT_Vector3DArray &pts)
 Build from a cloud of points. More...
 
void addPlane (const UT_PlaneT< T > &plane)
 
void applyOffset (T offset)
 
template<typename S >
T distance (UT_Vector3T< S > pos) const
 Return signed distance for the convex hull. More...
 
template<typename S >
T distance (UT_Vector3T< S > pos, T maxdist) const
 
template<typename IDX , typename S >
T distance (const UT_Array< IDX > &activeplanes, UT_Vector3T< S > pos, T maxdist) const
 
template<typename IDX , typename S >
bool findActivePlanes (UT_Array< IDX > &activeplanes, UT_Vector3T< S > pos, T rad) const
 
template<typename S >
bool contains (const UT_BoundingBoxT< S > &bbox) const
 
template<typename S >
bool excludes (UT_Vector3T< S > pos, T radius=0) const
 
template<typename S >
bool excludes (const UT_BoundingBoxT< S > &bbox) const
 
size_t format (char *buffer, size_t bufsize) const
 

Protected Attributes

UT_Array< UT_PlaneT< T > > myPlanes
 

Detailed Description

template<typename T>
class GU_ConvexHullHalfPlanesT< T >

Utility for working with a convex hull defined as a set of half planes.

Definition at line 97 of file GU_ConvexHull3D.h.

Constructor & Destructor Documentation

template<typename T>
GU_ConvexHullHalfPlanesT< T >::GU_ConvexHullHalfPlanesT ( const UT_Array< UT_PlaneT< T >> &  planes)
inline

Directly build from a set of directed half planes.

Definition at line 101 of file GU_ConvexHull3D.h.

template<typename T>
GU_ConvexHullHalfPlanesT< T >::GU_ConvexHullHalfPlanesT ( const UT_Vector3DArray pts)
inline

Build from a cloud of points.

Definition at line 107 of file GU_ConvexHull3D.h.

Member Function Documentation

template<typename T>
void GU_ConvexHullHalfPlanesT< T >::addPlane ( const UT_PlaneT< T > &  plane)
inline

Definition at line 174 of file GU_ConvexHull3D.h.

template<typename T>
void GU_ConvexHullHalfPlanesT< T >::applyOffset ( T  offset)
inline

Definition at line 179 of file GU_ConvexHull3D.h.

template<typename T>
template<typename S >
bool GU_ConvexHullHalfPlanesT< T >::contains ( const UT_BoundingBoxT< S > &  bbox) const
inline

Definition at line 275 of file GU_ConvexHull3D.h.

template<typename T>
template<typename S >
T GU_ConvexHullHalfPlanesT< T >::distance ( UT_Vector3T< S pos) const
inline

Return signed distance for the convex hull.

Definition at line 190 of file GU_ConvexHull3D.h.

template<typename T>
template<typename S >
T GU_ConvexHullHalfPlanesT< T >::distance ( UT_Vector3T< S pos,
T  maxdist 
) const
inline

Return signed distance for the convex hull. Early exits when maxdist is reached.

Definition at line 205 of file GU_ConvexHull3D.h.

template<typename T>
template<typename IDX , typename S >
T GU_ConvexHullHalfPlanesT< T >::distance ( const UT_Array< IDX > &  activeplanes,
UT_Vector3T< S pos,
T  maxdist 
) const
inline

Return signed distance for the convex hull. Restricts tests to a set of active planes. Early exits when maxdist is reached.

Definition at line 223 of file GU_ConvexHull3D.h.

template<typename T>
template<typename S >
bool GU_ConvexHullHalfPlanesT< T >::excludes ( UT_Vector3T< S pos,
T  radius = 0 
) const
inline

Definition at line 312 of file GU_ConvexHull3D.h.

template<typename T>
template<typename S >
bool GU_ConvexHullHalfPlanesT< T >::excludes ( const UT_BoundingBoxT< S > &  bbox) const
inline

Definition at line 324 of file GU_ConvexHull3D.h.

template<typename T>
template<typename IDX , typename S >
bool GU_ConvexHullHalfPlanesT< T >::findActivePlanes ( UT_Array< IDX > &  activeplanes,
UT_Vector3T< S pos,
T  rad 
) const
inline

Constructs a list of planes that are active for the given sphere. These will be any planes that intersect the sphere. The idea being that if one has already culled by this sphere, only these planes have to be tested to if we are in or out. If no active planes are found, the return result will be true if entirely inside the planes, or false if entirely out.

Definition at line 245 of file GU_ConvexHull3D.h.

template<typename T>
size_t GU_ConvexHullHalfPlanesT< T >::format ( char *  buffer,
size_t  bufsize 
) const
inline

Definition at line 339 of file GU_ConvexHull3D.h.

Member Data Documentation

template<typename T>
UT_Array<UT_PlaneT<T> > GU_ConvexHullHalfPlanesT< T >::myPlanes
protected

Definition at line 357 of file GU_ConvexHull3D.h.


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