HDK
|
#include <UT_SolidAngle.h>
Public Member Functions | |
UT_SolidAngle () | |
This is outlined so that we don't need to include UT_BVHImpl.h. More... | |
~UT_SolidAngle () | |
This is outlined so that we don't need to include UT_BVHImpl.h. More... | |
UT_SolidAngle (const int ntriangles, const int *const triangle_points, const int npoints, const UT_Vector3T< S > *const positions, const int order=2) | |
void | init (const int ntriangles, const int *const triangle_points, const int npoints, const UT_Vector3T< S > *const positions, const int order=2) |
void | clear () |
Frees myTree and myData, and clears the rest. More... | |
bool | isClear () const |
Returns true if this is clear. More... | |
T | computeSolidAngle (const UT_Vector3T< T > &query_point, const T accuracy_scale=T(2.0)) const |
Class for quickly approximating signed solid angle of a large mesh from many query points. This is useful for computing the generalized winding number at many points.
NOTE: This is currently only instantiated for <float,float>.
Definition at line 191 of file UT_SolidAngle.h.
UT_SolidAngle< T, S >::UT_SolidAngle | ( | ) |
This is outlined so that we don't need to include UT_BVHImpl.h.
UT_SolidAngle< T, S >::~UT_SolidAngle | ( | ) |
This is outlined so that we don't need to include UT_BVHImpl.h.
|
inline |
NOTE: This does not take ownership over triangle_points or positions, but does keep pointers to them, so the caller must keep them in scope for the lifetime of this structure.
Definition at line 202 of file UT_SolidAngle.h.
void UT_SolidAngle< T, S >::clear | ( | ) |
Frees myTree and myData, and clears the rest.
T UT_SolidAngle< T, S >::computeSolidAngle | ( | const UT_Vector3T< T > & | query_point, |
const T | accuracy_scale = T(2.0) |
||
) | const |
Returns an approximation of the signed solid angle of the mesh from the specified query_point accuracy_scale is the value of (maxP/q) beyond which the approximation of the box will be used.
void UT_SolidAngle< T, S >::init | ( | const int | ntriangles, |
const int *const | triangle_points, | ||
const int | npoints, | ||
const UT_Vector3T< S > *const | positions, | ||
const int | order = 2 |
||
) |
Initialize the tree and data. NOTE: It is safe to call init on a UT_SolidAngle that has had init called on it before, to re-initialize it.
|
inline |
Returns true if this is clear.
Definition at line 225 of file UT_SolidAngle.h.