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 88 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 92 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 98 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 165 of file GU_ConvexHull3D.h.

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

Definition at line 170 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 266 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 181 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 196 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 214 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 303 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 315 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 236 of file GU_ConvexHull3D.h.

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

Definition at line 330 of file GU_ConvexHull3D.h.

Member Data Documentation

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

Definition at line 348 of file GU_ConvexHull3D.h.


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