|
open_iA 2024.7
|
An axis-aligned bounding box. More...
#include <iAAABB.h>
Public Member Functions | |
| iAAABB () | |
| construct an "empty" bounding box, ready to be adjusted to new points via addPointToBox All 3 maximum coordinates are set to the minimum possible double value, all 3 minimum coordinates are set to the maximum possible double value. | |
| iAAABB (double const b[6]) | |
| construct bounding box from 6 double values (xmin, xmax, ymin, ymax, zmin, zmax) | |
| iAAABB (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) | |
| construct bounding box from 6 double values | |
| void | addPointToBox (iAVec3d const &pt) |
| add a point that should fit into the bounding box; if the current box does not contain this point, it is enlarged | |
| bool | contains (iAVec3d const &pt) const |
| return true if the given point is contained within the bounding box | |
| bool | intersects (iAAABB const &other) const |
| return true if the given other bounding box has intersecting space with this | |
| iAVec3d const & | maxCorner () const |
| Retrieve the maximum of each of the 3 coordinates as point vector. | |
| void | merge (iAAABB const &other) |
| merge another bounding box to this one, enlarging it if necessary | |
| iAVec3d const & | minCorner () const |
| Retrieve the minimum of each of the 3 coordinates as point vector. | |
An axis-aligned bounding box.
Provides convenience functions for creating a bounding box (adding a single point, merging boxes), as well as for testing containment/intersection.
| iAAABB::iAAABB | ( | ) |
construct an "empty" bounding box, ready to be adjusted to new points via addPointToBox All 3 maximum coordinates are set to the minimum possible double value, all 3 minimum coordinates are set to the maximum possible double value.
|
explicit |
construct bounding box from 6 double values (xmin, xmax, ymin, ymax, zmin, zmax)
|
explicit |
construct bounding box from 6 double values
| void iAAABB::addPointToBox | ( | iAVec3d const & | pt | ) |
add a point that should fit into the bounding box; if the current box does not contain this point, it is enlarged
| bool iAAABB::contains | ( | iAVec3d const & | pt | ) | const |
return true if the given point is contained within the bounding box
| bool iAAABB::intersects | ( | iAAABB const & | other | ) | const |
return true if the given other bounding box has intersecting space with this
| iAVec3d const & iAAABB::maxCorner | ( | ) | const |
Retrieve the maximum of each of the 3 coordinates as point vector.
| void iAAABB::merge | ( | iAAABB const & | other | ) |
merge another bounding box to this one, enlarging it if necessary
| iAVec3d const & iAAABB::minCorner | ( | ) | const |
Retrieve the minimum of each of the 3 coordinates as point vector.