![]() |
VR-Forces 4.0.4 Class Documentation
|
A simple bounding box. More...
Public Member Functions | |
| DtBoundingBox () | |
| Default constructor. Bounding box is set to zero. | |
| DtBoundingBox (float lx, float ly, float ux, float uy) | |
| Constructor. | |
| DtBoundingBox (DtPoint l, DtPoint u) | |
| ~DtBoundingBox () | |
| Destructor. | |
| void | invalidate () |
| Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions. | |
| bool | valid () const |
| Is the bounds valid. | |
| DtBoundingBox & | operator+= (const DtPoint vector) |
| Move the Bounding Box by a vector. | |
| DtBoundingBox & | operator|= (const DtBoundingBox &other) |
| Combine the two boxes together. | |
| void | centerOn (DtPoint pos) |
| Move the box's center point to the position, without changing the size. | |
| void | expandTo (float width, float height) |
| Expand the boxes size around its current center to have a width and height specified. | |
| void | getCenter (DtPoint &point) const |
| Get the center of the box. | |
| void | toPoints (float points[8]) const |
| Fill in an array of 2d points with the box corners. | |
Size accessors. | |
| float | width () const |
| Get the bounding box width. | |
| float | height () const |
| Get the bounding box height. | |
Location accessors. | |
| DtPoint & | upperPoint () |
| Get the upper point. | |
| const DtPoint & | upperPoint () const |
| Get the upper point (const). | |
| DtPoint & | lowerPoint () |
| Get the lower point. | |
| const DtPoint & | lowerPoint () const |
| Get the lower point (const). | |
Protected Attributes | |
| DtPoint | myLowerPoint |
| DtPoint | myUpperPoint |
A simple bounding box.
Default constructor. Bounding box is set to zero.
| makVrv::DtBoundingBox::DtBoundingBox | ( | float | lx, |
| float | ly, | ||
| float | ux, | ||
| float | uy | ||
| ) |
Constructor.
Destructor.
| void makVrv::DtBoundingBox::invalidate | ( | ) |
Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions.
| bool makVrv::DtBoundingBox::valid | ( | ) | const |
Is the bounds valid.
| DtBoundingBox& makVrv::DtBoundingBox::operator+= | ( | const DtPoint | vector | ) |
Move the Bounding Box by a vector.
| DtBoundingBox& makVrv::DtBoundingBox::operator|= | ( | const DtBoundingBox & | other | ) |
Combine the two boxes together.
| void makVrv::DtBoundingBox::centerOn | ( | DtPoint | pos | ) |
Move the box's center point to the position, without changing the size.
| void makVrv::DtBoundingBox::expandTo | ( | float | width, |
| float | height | ||
| ) |
Expand the boxes size around its current center to have a width and height specified.
| void makVrv::DtBoundingBox::getCenter | ( | DtPoint & | point | ) | const |
Get the center of the box.
| float makVrv::DtBoundingBox::width | ( | ) | const [inline] |
Get the bounding box width.
| float makVrv::DtBoundingBox::height | ( | ) | const [inline] |
Get the bounding box height.
| DtPoint& makVrv::DtBoundingBox::upperPoint | ( | ) | [inline] |
Get the upper point.
| const DtPoint& makVrv::DtBoundingBox::upperPoint | ( | ) | const [inline] |
Get the upper point (const).
| DtPoint& makVrv::DtBoundingBox::lowerPoint | ( | ) | [inline] |
Get the lower point.
| const DtPoint& makVrv::DtBoundingBox::lowerPoint | ( | ) | const [inline] |
Get the lower point (const).
| void makVrv::DtBoundingBox::toPoints | ( | float | points[8] | ) | const |
Fill in an array of 2d points with the box corners.
DtPoint makVrv::DtBoundingBox::myLowerPoint [protected] |
DtPoint makVrv::DtBoundingBox::myUpperPoint [protected] |