HDK
|
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< T > | getBasis () const |
const UT_Matrix3T< T > & | getRotationMatrix () const |
Return the rotation matrix of the OBB. More... | |
UT_Vector3T< T > | getRadii () const |
Return the half radii(side length) of the OBB. More... | |
UT_Vector3T< T > | getRotation () const |
Return the euler rotation angles (in radians). More... | |
UT_Vector3T< T > | getCenter () const |
Return the center of the OBB. More... | |
UT_Matrix4T< T > | getTransform () const |
Return the tranform matrix of the OBB. More... | |
UT_BoundingBoxT< T > | getBBox () const |
Return the untransformed bounding box. More... | |
UT_Vector3T< T > | getAxis (int axis) const |
Return the given axis direction. More... | |
UT_Vector3T< T > | getMinAxis () const |
Return the minimum axis direction. More... | |
UT_Vector3T< T > | getMaxAxis () 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... | |
Arbitrarily Oriented Bounding (OBB)
Definition at line 58 of file GU_Detail.h.
UT_OBBoxT< T >::UT_OBBoxT | ( | const UT_Matrix4T< T > & | transform, |
const UT_Vector3T< T > & | radii | ||
) |
Construct the OBB from a transform and radii.
UT_OBBoxT< T >::UT_OBBoxT | ( | const UT_Array< UT_Vector3T< T > > & | points, |
int | refinement = 6 |
||
) |
Construct the OBB from a set of points.
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_Vector3T< T >((T) 0) |
||
) |
Construct the OBB using the instancing parameters. Note that size is the full size in this case–not radii or half-sizes!
void UT_OBBoxT< T >::calcOBB | ( | const UT_Array< UT_Vector3T< T > > & | points, |
int | refinement = 6 |
||
) |
Calculate the OBB for the set of points.
UT_Vector3T<T> UT_OBBoxT< T >::getAxis | ( | int | axis | ) | const |
Return the given axis direction.
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.
UT_BoundingBoxT<T> UT_OBBoxT< T >::getBBox | ( | ) | const |
Return the untransformed bounding box.
|
inline |
Return the center of the OBB.
Definition at line 59 of file UT_OBBox.h.
UT_Vector3T<T> UT_OBBoxT< T >::getMaxAxis | ( | ) | const |
Return the maximum axis direction.
UT_Vector3T<T> UT_OBBoxT< T >::getMinAxis | ( | ) | const |
Return the minimum axis direction.
|
inline |
Return the half radii(side length) of the OBB.
Definition at line 55 of file UT_OBBox.h.
UT_Vector3T<T> UT_OBBoxT< T >::getRotation | ( | ) | const |
Return the euler rotation angles (in radians).
|
inline |
Return the rotation matrix of the OBB.
Definition at line 52 of file UT_OBBox.h.
UT_Matrix4T<T> UT_OBBoxT< T >::getTransform | ( | ) | const |
Return the tranform matrix of the OBB.
Checks whether this oriented bouding box intersects other.
bool UT_OBBoxT< T >::isInside | ( | const UT_Vector3T< T > & | pt | ) | const |
Test whether the point is contained inside the box.
Return whether the bbox is valid (contains any points).