#include <FXRangef.h>
Public Member Functions | |
FXRangef () | |
FXRangef (const FXRangef &bounds) | |
FXRangef (const FXVec3f &lo, const FXVec3f &hi) | |
FXRangef (FXfloat xlo, FXfloat xhi, FXfloat ylo, FXfloat yhi, FXfloat zlo, FXfloat zhi) | |
FXRangef (const FXSpheref &sphere) | |
FXRangef & | operator= (const FXRangef &bounds) |
FXRangef & | set (const FXRangef &bounds) |
FXRangef & | set (const FXVec3f &lo, const FXVec3f &hi) |
FXRangef & | set (FXfloat xlo, FXfloat xhi, FXfloat ylo, FXfloat yhi, FXfloat zlo, FXfloat zhi) |
FXVec3f & | operator[] (FXint i) |
const FXVec3f & | operator[] (FXint i) const |
bool | operator== (const FXRangef &r) const |
bool | operator!= (const FXRangef &r) const |
FXfloat | width () const |
FXfloat | height () const |
FXfloat | depth () const |
FXfloat | longest () const |
FXfloat | shortest () const |
FXfloat | diameter () const |
FXfloat | radius () const |
FXVec3f | diagonal () const |
FXVec3f | center () const |
bool | empty () const |
bool | contains (FXfloat x, FXfloat y, FXfloat z) const |
bool | contains (const FXVec3f &p) const |
bool | contains (const FXRangef &bounds) const |
bool | contains (const FXSpheref &sphere) const |
FXRangef & | include (FXfloat x, FXfloat y, FXfloat z) |
FXRangef & | include (const FXVec3f &v) |
FXRangef & | include (const FXRangef &box) |
FXRangef & | include (const FXSpheref &sphere) |
FXint | intersect (const FXVec4f &plane) const |
bool | intersect (const FXVec3f &u, const FXVec3f &v) |
FXVec3f | corner (FXint c) const |
Public Attributes | |
FXVec3f | lower |
FXVec3f | upper |
Friends | |
FXAPI bool | overlap (const FXRangef &a, const FXRangef &b) |
FXAPI FXRangef | unite (const FXRangef &a, const FXRangef &b) |
FXAPI FXRangef | intersect (const FXRangef &a, const FXRangef &b) |
FXAPI FXStream & | operator<< (FXStream &store, const FXRangef &bounds) |
FXAPI FXStream & | operator>> (FXStream &store, FXRangef &bounds) |
FX::FXRangef::FXRangef | ( | ) | [inline] |
Default constructor.
FX::FXRangef::FXRangef | ( | const FXRangef & | bounds | ) | [inline] |
Copy constructor.
Initialize from two vectors.
FX::FXRangef::FXRangef | ( | FXfloat | xlo, | |
FXfloat | xhi, | |||
FXfloat | ylo, | |||
FXfloat | yhi, | |||
FXfloat | zlo, | |||
FXfloat | zhi | |||
) | [inline] |
Initialize from six numbers.
FX::FXRangef::FXRangef | ( | const FXSpheref & | sphere | ) |
Initialize box to fully contain the given bounding sphere.
Set value from two vectors.
FXRangef& FX::FXRangef::set | ( | FXfloat | xlo, | |
FXfloat | xhi, | |||
FXfloat | ylo, | |||
FXfloat | yhi, | |||
FXfloat | zlo, | |||
FXfloat | zhi | |||
) | [inline] |
FXVec3f& FX::FXRangef::operator[] | ( | FXint | i | ) | [inline] |
Indexing with 0..1.
const FXVec3f& FX::FXRangef::operator[] | ( | FXint | i | ) | const [inline] |
Indexing with 0..1.
bool FX::FXRangef::operator== | ( | const FXRangef & | r | ) | const [inline] |
FXfloat FX::FXRangef::width | ( | ) | const [inline] |
Width of box.
FXfloat FX::FXRangef::height | ( | ) | const [inline] |
Height of box.
FXfloat FX::FXRangef::depth | ( | ) | const [inline] |
Depth of box.
FXfloat FX::FXRangef::longest | ( | ) | const |
Longest side.
FXfloat FX::FXRangef::shortest | ( | ) | const |
shortest side
FXfloat FX::FXRangef::diameter | ( | ) | const |
Length of diagonal.
FXfloat FX::FXRangef::radius | ( | ) | const |
Get radius of box.
FXVec3f FX::FXRangef::diagonal | ( | ) | const |
Compute diagonal.
FXVec3f FX::FXRangef::center | ( | ) | const |
Get center of box.
bool FX::FXRangef::empty | ( | ) | const |
Test if empty.
bool FX::FXRangef::contains | ( | FXfloat | x, | |
FXfloat | y, | |||
FXfloat | z | |||
) | const |
Test if box contains point x,y,z.
bool FX::FXRangef::contains | ( | const FXVec3f & | p | ) | const |
Test if box contains point p.
bool FX::FXRangef::contains | ( | const FXRangef & | bounds | ) | const |
Test if box properly contains another box.
bool FX::FXRangef::contains | ( | const FXSpheref & | sphere | ) | const |
Test if box properly contains sphere.
FXRangef& FX::FXRangef::include | ( | FXfloat | x, | |
FXfloat | y, | |||
FXfloat | z | |||
) |
Include point.
FXint FX::FXRangef::intersect | ( | const FXVec4f & | plane | ) | const |
Intersect box with normalized plane ax+by+cz+w; returns -1,0,+1.
FXVec3f FX::FXRangef::corner | ( | FXint | c | ) | const [inline] |
Get corner number 0..7.
Test if boxes a and b overlap.
Intersection of two boxes.
Save object to a stream.
Load object from a stream.