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

Arbitrarily Oriented Bounding (OBB) More...

#include <GU_Detail.h>

Public Member Functions

 UT_OBBoxT ()
 
 UT_OBBoxT (const UT_Matrix4T< T > &transform, const UT_Vector3T< T > &radii)
 Construct the OBB from a transform and radii. More...
 
 UT_OBBoxT (const UT_Array< UT_Vector3T< T > > &points, int refinement=6)
 Construct the OBB from a set of points. More...
 
 UT_OBBoxT (const UT_Vector3T< T > &position, const UT_Vector3T< T > &size, const UT_QuaternionT< T > &orientation, const UT_Vector3T< T > &pivot=UT_Vector3T< T >((T) 0))
 
bool operator== (const UT_OBBoxT< T > &other) const
 
bool isValid () const
 Return whether the bbox is valid (contains any points). More...
 
void calcOBB (const UT_Array< UT_Vector3T< T > > &points, int refinement=6)
 Calculate the OBB for the set of points. More...
 
UT_Matrix3T< TgetBasis () const
 
const UT_Matrix3T< T > & getRotationMatrix () const
 Return the rotation matrix of the OBB. More...
 
UT_Vector3T< TgetRadii () const
 Return the half radii(side length) of the OBB. More...
 
UT_Vector3T< TgetRotation () const
 Return the euler rotation angles (in radians). More...
 
UT_Vector3T< TgetCenter () const
 Return the center of the OBB. More...
 
UT_Matrix4T< TgetTransform () const
 Return the tranform matrix of the OBB. More...
 
UT_BoundingBoxT< TgetBBox () const
 Return the untransformed bounding box. More...
 
UT_Vector3T< TgetAxis (int axis) const
 Return the given axis direction. More...
 
UT_Vector3T< TgetMinAxis () const
 Return the minimum axis direction. More...
 
UT_Vector3T< TgetMaxAxis () const
 Return the maximum axis direction. More...
 
bool intersects (const UT_OBBoxT< T > &other) const
 Checks whether this oriented bouding box intersects other. More...
 
bool isInside (const UT_Vector3T< T > &pt) const
 Test whether the point is contained inside the box. More...
 

Detailed Description

template<typename T>
class UT_OBBoxT< T >

Arbitrarily Oriented Bounding (OBB)

Definition at line 58 of file GU_Detail.h.

Constructor & Destructor Documentation

template<typename T>
UT_OBBoxT< T >::UT_OBBoxT ( )
template<typename T>
UT_OBBoxT< T >::UT_OBBoxT ( const UT_Matrix4T< T > &  transform,
const UT_Vector3T< T > &  radii 
)

Construct the OBB from a transform and radii.

template<typename T>
UT_OBBoxT< T >::UT_OBBoxT ( const UT_Array< UT_Vector3T< T > > &  points,
int  refinement = 6 
)

Construct the OBB from a set of points.

template<typename T>
UT_OBBoxT< T >::UT_OBBoxT ( const UT_Vector3T< T > &  position,
const UT_Vector3T< T > &  size,
const UT_QuaternionT< T > &  orientation,
const UT_Vector3T< T > &  pivot = UT_Vector3TT >((T) 0) 
)

Construct the OBB using the instancing parameters. Note that size is the full size in this case–not radii or half-sizes!

Member Function Documentation

template<typename T>
void UT_OBBoxT< T >::calcOBB ( const UT_Array< UT_Vector3T< T > > &  points,
int  refinement = 6 
)

Calculate the OBB for the set of points.

template<typename T>
UT_Vector3T<T> UT_OBBoxT< T >::getAxis ( int  axis) const

Return the given axis direction.

template<typename T>
UT_Matrix3T<T> UT_OBBoxT< T >::getBasis ( ) const

Return the basis that defines the orientation of the OBB Note: this is the transpose of what you probably expect.

template<typename T>
UT_BoundingBoxT<T> UT_OBBoxT< T >::getBBox ( ) const

Return the untransformed bounding box.

template<typename T>
UT_Vector3T<T> UT_OBBoxT< T >::getCenter ( ) const
inline

Return the center of the OBB.

Definition at line 59 of file UT_OBBox.h.

template<typename T>
UT_Vector3T<T> UT_OBBoxT< T >::getMaxAxis ( ) const

Return the maximum axis direction.

template<typename T>
UT_Vector3T<T> UT_OBBoxT< T >::getMinAxis ( ) const

Return the minimum axis direction.

template<typename T>
UT_Vector3T<T> UT_OBBoxT< T >::getRadii ( ) const
inline

Return the half radii(side length) of the OBB.

Definition at line 55 of file UT_OBBox.h.

template<typename T>
UT_Vector3T<T> UT_OBBoxT< T >::getRotation ( ) const

Return the euler rotation angles (in radians).

template<typename T>
const UT_Matrix3T<T>& UT_OBBoxT< T >::getRotationMatrix ( ) const
inline

Return the rotation matrix of the OBB.

Definition at line 52 of file UT_OBBox.h.

template<typename T>
UT_Matrix4T<T> UT_OBBoxT< T >::getTransform ( ) const

Return the tranform matrix of the OBB.

template<typename T>
bool UT_OBBoxT< T >::intersects ( const UT_OBBoxT< T > &  other) const

Checks whether this oriented bouding box intersects other.

template<typename T>
bool UT_OBBoxT< T >::isInside ( const UT_Vector3T< T > &  pt) const

Test whether the point is contained inside the box.

template<typename T>
bool UT_OBBoxT< T >::isValid ( ) const

Return whether the bbox is valid (contains any points).

template<typename T>
bool UT_OBBoxT< T >::operator== ( const UT_OBBoxT< T > &  other) const

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