HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HDK_Sample::UT_SubtendedAngle< T, S > Class Template Reference

#include <UT_SolidAngle.h>

Classes

struct  BoxData
 

Public Member Functions

 UT_SubtendedAngle ()
 This is outlined so that we don't need to include UT_BVHImpl.h. More...
 
 ~UT_SubtendedAngle ()
 This is outlined so that we don't need to include UT_BVHImpl.h. More...
 
 UT_SubtendedAngle (const int nsegments, const int *const segment_points, const int npoints, const UT_Vector2T< S > *const positions, const int order=2)
 
void init (const int nsegments, const int *const segment_points, const int npoints, const UT_Vector2T< 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...
 
computeAngle (const UT_Vector2T< T > &query_point, const T accuracy_scale=T(2.0)) const
 

Detailed Description

template<typename T, typename S>
class HDK_Sample::UT_SubtendedAngle< T, S >

Class for quickly approximating signed subtended angle of a large curve 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 294 of file UT_SolidAngle.h.

Constructor & Destructor Documentation

template<typename T , typename S >
UT_SubtendedAngle< T, S >::UT_SubtendedAngle ( )

This is outlined so that we don't need to include UT_BVHImpl.h.

Definition at line 900 of file UT_SolidAngle.C.

template<typename T , typename S >
UT_SubtendedAngle< T, S >::~UT_SubtendedAngle ( )

This is outlined so that we don't need to include UT_BVHImpl.h.

Definition at line 912 of file UT_SolidAngle.C.

template<typename T, typename S>
HDK_Sample::UT_SubtendedAngle< T, S >::UT_SubtendedAngle ( const int  nsegments,
const int *const  segment_points,
const int  npoints,
const UT_Vector2T< S > *const  positions,
const int  order = 2 
)
inline

NOTE: This does not take ownership over segment_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 305 of file UT_SolidAngle.h.

Member Function Documentation

template<typename T , typename S >
void UT_SubtendedAngle< T, S >::clear ( void  )

Frees myTree and myData, and clears the rest.

Definition at line 1272 of file UT_SolidAngle.C.

template<typename T, typename S >
T UT_SubtendedAngle< T, S >::computeAngle ( const UT_Vector2T< T > &  query_point,
const 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.

Definition at line 1285 of file UT_SolidAngle.C.

template<typename T , typename S>
void UT_SubtendedAngle< T, S >::init ( const int  nsegments,
const int *const  segment_points,
const int  npoints,
const UT_Vector2T< 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.

Definition at line 928 of file UT_SolidAngle.C.

template<typename T, typename S>
bool HDK_Sample::UT_SubtendedAngle< T, S >::isClear ( ) const
inline

Returns true if this is clear.

Definition at line 328 of file UT_SolidAngle.h.


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