#include <OPC_IceHook.h>
Public Member Functions | |
inline_ | AABB () |
Constructor. | |
void | Extend (const Point &p) |
inline_ void | GetCenter (Point ¢er) 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_ AABB & | operator*= (float s) |
Operator for AABB *= float. Scales the extents, keeps same center. | |
inline_ AABB & | operator+= (const Point &trans) |
Operator for AABB += Point. Translates the box. | |
inline_ AABB & | operator/= (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 |
Definition at line 268 of file OPC_IceHook.h.
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.
void IceMaths::AABB::Extend | ( | const Point & | p | ) | [inline] |
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.
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.
a | [in] the other AABB |
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.
a | [in] the other AABB |
Definition at line 379 of file OPC_IceHook.h.
Computes the 1D-intersection between two AABBs, on a given axis.
a | [in] the other AABB |
axis | [in] the axis (0, 1, 2) |
Definition at line 410 of file OPC_IceHook.h.
inline_ BOOL IceMaths::AABB::IsValid | ( | ) | const [inline] |
Checks the AABB is valid.
Definition at line 451 of file OPC_IceHook.h.
Operator for AABB *= float. Scales the extents, keeps same center.
Definition at line 461 of file OPC_IceHook.h.
Operator for AABB += Point. Translates the box.
Definition at line 467 of file OPC_IceHook.h.
Operator for AABB /= float. Scales the extents, keeps same center.
Definition at line 464 of file OPC_IceHook.h.
Recomputes the AABB after an arbitrary transform by a 4x4 matrix.
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.
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.
Setups an AABB from min & max vectors.
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.
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.