|
| TBoundingBox () |
| Create a new invalid bounding box. More...
|
|
| TBoundingBox (const PointType &p) |
| Create a collapsed bounding box from a single point.
|
|
| TBoundingBox (const PointType &min, const PointType &max) |
| Create a bounding box from two positions.
|
|
bool | operator== (const TBoundingBox &bbox) const |
| Test for equality against another bounding box.
|
|
bool | operator!= (const TBoundingBox &bbox) const |
| Test for inequality against another bounding box.
|
|
Scalar | getVolume () const |
| Calculate the n-dimensional volume of the bounding box.
|
|
float | getSurfaceArea () const |
| Calculate the n-1 dimensional volume of the boundary.
|
|
PointType | getCenter () const |
| Return the center point.
|
|
bool | contains (const PointType &p, bool strict=false) const |
| Check whether a point lies on or inside the bounding box. More...
|
|
bool | contains (const TBoundingBox &bbox, bool strict=false) const |
| Check whether a specified bounding box lies on or within the current bounding box. More...
|
|
bool | overlaps (const TBoundingBox &bbox, bool strict=false) const |
| Check two axis-aligned bounding boxes for possible overlap. More...
|
|
Scalar | squaredDistanceTo (const PointType &p) const |
| Calculate the smallest squared distance between the axis-aligned bounding box and the point p .
|
|
Scalar | distanceTo (const PointType &p) const |
| Calculate the smallest distance between the axis-aligned bounding box and the point p .
|
|
Scalar | squaredDistanceTo (const TBoundingBox &bbox) const |
| Calculate the smallest square distance between the axis-aligned bounding box and bbox .
|
|
Scalar | distanceTo (const TBoundingBox &bbox) const |
| Calculate the smallest distance between the axis-aligned bounding box and bbox .
|
|
bool | isValid () const |
| Check whether this is a valid bounding box. More...
|
|
bool | isPoint () const |
| Check whether this bounding box has collapsed to a single point.
|
|
bool | hasVolume () const |
| Check whether this bounding box has any associated volume.
|
|
int | getMajorAxis () const |
| Return the dimension index with the largest associated side length.
|
|
int | getMinorAxis () const |
| Return the dimension index with the shortest associated side length.
|
|
VectorType | getExtents () const |
| Calculate the bounding box extents. More...
|
|
void | clip (const TBoundingBox &bbox) |
| Clip to another bounding box.
|
|
void | reset () |
| Mark the bounding box as invalid. More...
|
|
void | expandBy (const PointType &p) |
| Expand the bounding box to contain another point.
|
|
void | expandBy (const TBoundingBox &bbox) |
| Expand the bounding box to contain another bounding box.
|
|
int | getLargestAxis () const |
| Return the index of the largest axis.
|
|
PointType | getCorner (int index) const |
| Return the position of a bounding box corner.
|
|
std::string | toString () const |
| Return a string representation of the bounding box.
|
|
bool | rayIntersect (const Ray3f &ray) const |
| Check if a ray intersects a bounding box.
|
|
bool | rayIntersect (const Ray3f &ray, float &nearT, float &farT) const |
| Return the overlapping region of the bounding box and an unbounded ray.
|
|
template<typename _PointType>
struct TBoundingBox< _PointType >
Generic n-dimensional bounding box data structure.
Maintains a minimum and maximum position along each dimension and provides various convenience functions for querying and modifying them.
This class is parameterized by the underlying point data structure, which permits the use of different scalar types and dimensionalities, e.g.
Generic n-dimensional bounding box data structure.
Generic N-dimensional point data structure based on Eigen::Matrix.
- Template Parameters
-
T | The underlying point data type (e.g. Point2d ) |
Definition at line 42 of file bbox.h.
template<typename _PointType >
Check whether a specified bounding box lies on or within the current bounding box.
Note that by definition, an 'invalid' bounding box (where min= and max= ) does not cover any space. Hence, this method will always return true when given such an argument.
- Parameters
-
strict | Set this parameter to true if the bounding box boundary should be excluded in the test |
Definition at line 136 of file bbox.h.