Public Member Functions | Public Attributes | Private Attributes | List of all members
IceMaths::AABB Class Reference

#include <OPC_IceHook.h>

Public Member Functions

inline_ AABB ()
 Constructor. More...
 
void Extend (const Point &p)
 
inline_ void GetCenter (Point &center) const
 Get box center. More...
 
inline_ float GetCenter (udword axis) const
 Get component of the box's center along a given axis. More...
 
inline_ float GetDepth () const
 
inline_ void GetDiagonal (Point &diagonal) const
 Get box diagonal. More...
 
inline_ void GetExtents (Point &extents) const
 Get box extents. More...
 
inline_ float GetExtents (udword axis) const
 Get component of the box's extents along a given axis. More...
 
inline_ float GetHeight () const
 
inline_ void GetMax (Point &max) const
 Get max point of the box. More...
 
inline_ float GetMax (udword axis) const
 Get component of the box's max point along a given axis. More...
 
inline_ void GetMin (Point &min) const
 Get min point of the box. More...
 
inline_ float GetMin (udword axis) const
 Get component of the box's min point along a given axis. More...
 
float GetSize () const
 
inline_ float GetVolume () const
 Volume. More...
 
inline_ float GetWidth () const
 
inline_ bool GomezIntersect (const AABB &a)
 
inline_ BOOL Intersect (const AABB &a) const
 
inline_ BOOL Intersect (const AABB &a, udword axis) const
 
inline_ BOOL IsValid () const
 
inline_ AABBoperator*= (float s)
 Operator for AABB *= float. Scales the extents, keeps same center. More...
 
inline_ AABBoperator+= (const Point &trans)
 Operator for AABB += Point. Translates the box. More...
 
inline_ AABBoperator/= (float s)
 Operator for AABB /= float. Scales the extents, keeps same center. More...
 
inline_ void Rotate (const Matrix4x4 &mtx, AABB &aabb) const
 
void SetCenterExtents (const Point &c, const Point &e)
 
void SetEmpty ()
 
void SetMinMax (const Point &min, const Point &max)
 
void SetPoint (const Point &pt)
 
inline_ ~AABB ()
 Destructor. More...
 

Public Attributes

 AABB_COMMON_METHODS
 Type-independent methods. More...
 

Private Attributes

Point mCenter
 AABB Center. More...
 
Point mExtents
 x, y and z extents More...
 

Detailed Description

Definition at line 268 of file OPC_IceHook.h.

Constructor & Destructor Documentation

inline_ IceMaths::AABB::AABB ( )
inline

Constructor.

Definition at line 272 of file OPC_IceHook.h.

inline_ IceMaths::AABB::~AABB ( )
inline

Destructor.

Definition at line 274 of file OPC_IceHook.h.

Member Function Documentation

void IceMaths::AABB::Extend ( const Point p)
inline

Extends the AABB.

Parameters
p[in] the next point

Definition at line 325 of file OPC_IceHook.h.

inline_ void IceMaths::AABB::GetCenter ( Point center) const
inline

Get box center.

Definition at line 354 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetCenter ( udword  axis) const
inline

Get component of the box's center along a given axis.

Definition at line 359 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetDepth ( ) const
inline

Definition at line 367 of file OPC_IceHook.h.

inline_ void IceMaths::AABB::GetDiagonal ( Point diagonal) const
inline

Get box diagonal.

Definition at line 364 of file OPC_IceHook.h.

inline_ void IceMaths::AABB::GetExtents ( Point extents) const
inline

Get box extents.

Definition at line 356 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetExtents ( udword  axis) const
inline

Get component of the box's extents along a given axis.

Definition at line 361 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetHeight ( ) const
inline

Definition at line 366 of file OPC_IceHook.h.

inline_ void IceMaths::AABB::GetMax ( Point max) const
inline

Get max point of the box.

Definition at line 346 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetMax ( udword  axis) const
inline

Get component of the box's max point along a given axis.

Definition at line 351 of file OPC_IceHook.h.

inline_ void IceMaths::AABB::GetMin ( Point min) const
inline

Get min point of the box.

Definition at line 344 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetMin ( udword  axis) const
inline

Get component of the box's min point along a given axis.

Definition at line 349 of file OPC_IceHook.h.

float IceMaths::AABB::GetSize ( ) const
inline

Gets the size of the AABB. The size is defined as the longest extent.

Returns
the size of the AABB

Definition at line 317 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetVolume ( ) const
inline

Volume.

Definition at line 370 of file OPC_IceHook.h.

inline_ float IceMaths::AABB::GetWidth ( ) const
inline

Definition at line 365 of file OPC_IceHook.h.

inline_ bool IceMaths::AABB::GomezIntersect ( const AABB a)
inline

The standard intersection method from Gamasutra. Just here to check its speed against the one above.

Parameters
a[in] the other AABB
Returns
true on intersection

Definition at line 394 of file OPC_IceHook.h.

inline_ BOOL IceMaths::AABB::Intersect ( const AABB a) const
inline

Computes the intersection between two AABBs.

Parameters
a[in] the other AABB
Returns
true on intersection

Definition at line 379 of file OPC_IceHook.h.

inline_ BOOL IceMaths::AABB::Intersect ( const AABB a,
udword  axis 
) const
inline

Computes the 1D-intersection between two AABBs, on a given axis.

Parameters
a[in] the other AABB
axis[in] the axis (0, 1, 2)
Returns
true on intersection

Definition at line 410 of file OPC_IceHook.h.

inline_ BOOL IceMaths::AABB::IsValid ( ) const
inline

Checks the AABB is valid.

Returns
true if the box is valid

Definition at line 451 of file OPC_IceHook.h.

inline_ AABB& IceMaths::AABB::operator*= ( float  s)
inline

Operator for AABB *= float. Scales the extents, keeps same center.

Definition at line 461 of file OPC_IceHook.h.

inline_ AABB& IceMaths::AABB::operator+= ( const Point trans)
inline

Operator for AABB += Point. Translates the box.

Definition at line 467 of file OPC_IceHook.h.

inline_ AABB& IceMaths::AABB::operator/= ( float  s)
inline

Operator for AABB /= float. Scales the extents, keeps same center.

Definition at line 464 of file OPC_IceHook.h.

inline_ void IceMaths::AABB::Rotate ( const Matrix4x4 mtx,
AABB aabb 
) const
inline

Recomputes the AABB after an arbitrary transform by a 4x4 matrix.

Parameters
mtx[in] the transform matrix
aabb[out] the transformed AABB [can be *this]

Definition at line 425 of file OPC_IceHook.h.

void IceMaths::AABB::SetCenterExtents ( const Point c,
const Point e 
)
inline

Setups an AABB from center & extents vectors.

Parameters
c[in] the center point
e[in] the extents vector

Definition at line 295 of file OPC_IceHook.h.

void IceMaths::AABB::SetEmpty ( )
inline

Setups an empty AABB.

Definition at line 302 of file OPC_IceHook.h.

void IceMaths::AABB::SetMinMax ( const Point min,
const Point max 
)
inline

Setups an AABB from min & max vectors.

Parameters
min[in] the min point
max[in] the max point

Definition at line 286 of file OPC_IceHook.h.

void IceMaths::AABB::SetPoint ( const Point pt)
inline

Setups a point AABB.

Definition at line 309 of file OPC_IceHook.h.

Member Data Documentation

IceMaths::AABB::AABB_COMMON_METHODS

Type-independent methods.

Definition at line 277 of file OPC_IceHook.h.

Point IceMaths::AABB::mCenter
private

AABB Center.

Definition at line 473 of file OPC_IceHook.h.

Point IceMaths::AABB::mExtents
private

x, y and z extents

Definition at line 474 of file OPC_IceHook.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:45