Public Member Functions | Public Attributes | Private Attributes
IceMaths::AABB Class Reference

#include <OPC_IceHook.h>

List of all members.

Public Member Functions

inline_ AABB ()
 Constructor.
void Extend (const Point &p)
inline_ void GetCenter (Point &center) const
 Get box center.
inline_ float GetCenter (udword axis) const
 Get component of the box's center along a given axis.
inline_ float GetDepth () const
inline_ void GetDiagonal (Point &diagonal) const
 Get box diagonal.
inline_ void GetExtents (Point &extents) const
 Get box extents.
inline_ float GetExtents (udword axis) const
 Get component of the box's extents along a given axis.
inline_ float GetHeight () const
inline_ void GetMax (Point &max) const
 Get max point of the box.
inline_ float GetMax (udword axis) const
 Get component of the box's max point along a given axis.
inline_ void GetMin (Point &min) const
 Get min point of the box.
inline_ float GetMin (udword axis) const
 Get component of the box's min point along a given axis.
float GetSize () const
inline_ float GetVolume () const
 Volume.
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.
inline_ AABBoperator+= (const Point &trans)
 Operator for AABB += Point. Translates the box.
inline_ AABBoperator/= (float s)
 Operator for AABB /= float. Scales the extents, keeps same center.
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.

Public Attributes

 AABB_COMMON_METHODS
 Type-independent methods.

Private Attributes

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

Detailed Description

Definition at line 268 of file OPC_IceHook.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 272 of file OPC_IceHook.h.

Destructor.

Definition at line 274 of file OPC_IceHook.h.


Member Function Documentation

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.

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.

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.

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.

Setups a point AABB.

Definition at line 309 of file OPC_IceHook.h.


Member Data Documentation

Type-independent methods.

Definition at line 277 of file OPC_IceHook.h.

AABB Center.

Definition at line 473 of file OPC_IceHook.h.

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 Sun Apr 2 2017 03:44:02