Sirikata
|
#include <BoundingBox.hpp>
Public Member Functions | |
BoundingBox () | |
BoundingBox (const Vector3< real > ¢er, float radius) | |
template<typename flt > | |
BoundingBox (const BoundingBox< flt > &input) | |
BoundingBox (const Vector3< real > &imin, const Vector3< real > &imax) | |
const Vector3< real > & | min () const |
const Vector3f & | across () const |
const Vector3f & | diag () const |
const Vector3f & | extents () const |
Vector3< real > | max () const |
Vector3< real > | center () const |
BoundingSphere< real > | toBoundingSphere () const |
BoundingBox< real > | merge (const BoundingBox< real > &other) |
BoundingBox | merge (const Vector3< real > &other) |
BoundingBox & | mergeIn (const BoundingBox< real > &other) |
BoundingBox & | mergeIn (const Vector3< real > &other) |
bool | contains (const Vector3< real > &point, real eps=BBOX_CONTAINS_EPSILON) const |
Returns whether the point is within the bounding box, within the given epsilon. | |
bool | degenerate () const |
real | volume () const |
Vector3< real > | clamp (const Vector3< real > &v) const |
bool | intersects (const BoundingBox &bbox2) const |
bool | operator== (const BoundingBox &rhs) const |
bool | operator!= (const BoundingBox &rhs) const |
Static Public Member Functions | |
static BoundingBox< real > | null () |
Private Attributes | |
Vector3< real > | mMin |
Vector3f | mAcross |
Sirikata::BoundingBox< real >::BoundingBox | ( | ) | [inline] |
Referenced by Sirikata::BoundingBox< real >::intersects(), and Sirikata::BoundingBox< real >::merge().
Sirikata::BoundingBox< real >::BoundingBox | ( | const Vector3< real > & | center, |
float | radius | ||
) | [inline] |
Sirikata::BoundingBox< real >::BoundingBox | ( | const BoundingBox< flt > & | input | ) | [inline] |
Sirikata::BoundingBox< real >::BoundingBox | ( | const Vector3< real > & | imin, |
const Vector3< real > & | imax | ||
) | [inline] |
const Vector3f& Sirikata::BoundingBox< real >::across | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mAcross.
Referenced by Sirikata::BoundingBox< real >::BoundingBox().
Vector3<real> Sirikata::BoundingBox< real >::center | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mAcross, and Sirikata::BoundingBox< real >::mMin.
Referenced by Sirikata::BoundingBox< real >::toBoundingSphere().
Vector3<real> Sirikata::BoundingBox< real >::clamp | ( | const Vector3< real > & | v | ) | const [inline] |
bool Sirikata::BoundingBox< real >::contains | ( | const Vector3< real > & | point, |
real | eps = BBOX_CONTAINS_EPSILON |
||
) | const [inline] |
Returns whether the point is within the bounding box, within the given epsilon.
A positive epsilon grows the bounding box, negative shrinks it.
point | The point to test against the bounding box. |
eps | epsilon error, applied for all dimensions equally. Positive values increase the size of the bounding box, negative values decrease it. |
References Sirikata::BoundingBox< real >::max(), and Sirikata::BoundingBox< real >::min().
bool Sirikata::BoundingBox< real >::degenerate | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mAcross.
Referenced by Sirikata::BoundingBox< real >::volume().
const Vector3f& Sirikata::BoundingBox< real >::diag | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mAcross.
const Vector3f& Sirikata::BoundingBox< real >::extents | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mAcross.
bool Sirikata::BoundingBox< real >::intersects | ( | const BoundingBox< real > & | bbox2 | ) | const [inline] |
Vector3<real> Sirikata::BoundingBox< real >::max | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mAcross, and Sirikata::BoundingBox< real >::mMin.
Referenced by Sirikata::BoundingBox< real >::clamp(), Sirikata::BoundingBox< real >::contains(), Sirikata::BoundingBox< real >::intersects(), Sirikata::BoundingBox< real >::merge(), Sirikata::BoundingBox< real >::mergeIn(), and Sirikata::BoundingBox< real >::toBoundingSphere().
BoundingBox<real> Sirikata::BoundingBox< real >::merge | ( | const BoundingBox< real > & | other | ) | [inline] |
BoundingBox Sirikata::BoundingBox< real >::merge | ( | const Vector3< real > & | other | ) | [inline] |
BoundingBox& Sirikata::BoundingBox< real >::mergeIn | ( | const BoundingBox< real > & | other | ) | [inline] |
BoundingBox& Sirikata::BoundingBox< real >::mergeIn | ( | const Vector3< real > & | other | ) | [inline] |
const Vector3<real>& Sirikata::BoundingBox< real >::min | ( | ) | const [inline] |
References Sirikata::BoundingBox< real >::mMin.
Referenced by Sirikata::BoundingBox< real >::BoundingBox(), Sirikata::BoundingBox< real >::clamp(), Sirikata::BoundingBox< real >::contains(), Sirikata::BoundingBox< real >::intersects(), Sirikata::BoundingBox< real >::merge(), Sirikata::BoundingBox< real >::mergeIn(), and Sirikata::BoundingBox< real >::toBoundingSphere().
static BoundingBox<real> Sirikata::BoundingBox< real >::null | ( | ) | [inline, static] |
bool Sirikata::BoundingBox< real >::operator!= | ( | const BoundingBox< real > & | rhs | ) | const [inline] |
bool Sirikata::BoundingBox< real >::operator== | ( | const BoundingBox< real > & | rhs | ) | const [inline] |
BoundingSphere<real> Sirikata::BoundingBox< real >::toBoundingSphere | ( | ) | const [inline] |
real Sirikata::BoundingBox< real >::volume | ( | ) | const [inline] |
Vector3f Sirikata::BoundingBox< real >::mAcross [private] |
Referenced by Sirikata::BoundingBox< real >::across(), Sirikata::BoundingBox< real >::BoundingBox(), Sirikata::BoundingBox< real >::center(), Sirikata::BoundingBox< real >::degenerate(), Sirikata::BoundingBox< real >::diag(), Sirikata::BoundingBox< real >::extents(), Sirikata::BoundingBox< real >::max(), Sirikata::BoundingBox< real >::mergeIn(), Sirikata::BoundingBox< real >::operator!=(), Sirikata::BoundingBox< real >::operator==(), and Sirikata::BoundingBox< real >::volume().
Vector3<real> Sirikata::BoundingBox< real >::mMin [private] |
Referenced by Sirikata::BoundingBox< real >::BoundingBox(), Sirikata::BoundingBox< real >::center(), Sirikata::BoundingBox< real >::max(), Sirikata::BoundingBox< real >::mergeIn(), Sirikata::BoundingBox< real >::min(), Sirikata::BoundingBox< real >::operator!=(), and Sirikata::BoundingBox< real >::operator==().