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