AnimaL |
Tutorial |
Documentation |
#include <boundingBox.h>
Methods to insert points or boxes, translate and rotate, test intersection.
Definition at line 23 of file boundingBox.h.
Public Member Functions | |
Constructors | |
BoundingBox3D (Real xm=INFINITY, Real ym=INFINITY, Real zm=INFINITY, Real xM=-INFINITY, Real yM=-INFINITY, Real zM=-INFINITY) | |
Define min and max values. | |
BoundingBox3D (const Point &v) | |
Contains only one point. | |
BoundingBox3D (const Point &v_min, const Point &v_max) | |
Provide min and max points. | |
Access data | |
Point | min () const |
Min point. | |
Point | max () const |
Max point. | |
Geometry | |
void | insert (const Point &v) |
Insert a point. | |
void | insert (const BoundingBox3D &b) |
Insert a bounding box. | |
void | shift (const Point &v) |
Shift the bounding box. | |
template<class RotationMatrix> BoundingBox3D | move (const Point &p, const RotationMatrix &r) |
Rotate and translate the bounding box. | |
Private Attributes | |
Real | _max [3] |
xMax, yMax, zMax | |
Real | _min [3] |
xMin, yMin, zMin | |
Friends | |
Intersection | |
template<class P, class R> bool | intersect (const BoundingBox3D< P, R > &b1, const BoundingBox3D< P, R > &b2) |
Test bounding box intersection. | |
Input-Output | |
template<class P, class R> std::ostream & | operator<< (std::ostream &, const BoundingBox3D< P, R > &) |
Output. |
|
Define min and max values. Default values guarantee that the intersection test returns always false. Definition at line 33 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, and animal::BoundingBox3D< Point, Real >::_min. Referenced by animal::BoundingBox3D< Point, Real >::move(). |
|
Contains only one point.
Definition at line 47 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, and animal::BoundingBox3D< Point, Real >::_min. |
|
Provide min and max points.
Definition at line 55 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, and animal::BoundingBox3D< Point, Real >::_min. |
|
Insert a bounding box.
Definition at line 90 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, and animal::BoundingBox3D< Point, Real >::_min. |
|
Insert a point.
Definition at line 81 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, and animal::BoundingBox3D< Point, Real >::_min. |
|
Max point.
Definition at line 72 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max. |
|
Min point.
Definition at line 69 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_min. |
|
Rotate and translate the bounding box. The result is an axis-aligned box wich fits the rotated and translated box. Definition at line 112 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, animal::BoundingBox3D< Point, Real >::_min, and animal::BoundingBox3D< Point, Real >::BoundingBox3D(). |
|
Shift the bounding box.
Definition at line 99 of file boundingBox.h. References animal::BoundingBox3D< Point, Real >::_max, and animal::BoundingBox3D< Point, Real >::_min. |
|
Test bounding box intersection.
Definition at line 209 of file boundingBox.h. |
|
Output.
Definition at line 200 of file boundingBox.h. |
|
xMax, yMax, zMax
Definition at line 181 of file boundingBox.h. Referenced by animal::BoundingBox3D< Point, Real >::BoundingBox3D(), animal::BoundingBox3D< Point, Real >::insert(), animal::intersect(), animal::BoundingBox3D< Point, Real >::max(), animal::BoundingBox3D< Point, Real >::move(), and animal::BoundingBox3D< Point, Real >::shift(). |
|
xMin, yMin, zMin
Definition at line 182 of file boundingBox.h. Referenced by animal::BoundingBox3D< Point, Real >::BoundingBox3D(), animal::BoundingBox3D< Point, Real >::insert(), animal::intersect(), animal::BoundingBox3D< Point, Real >::min(), animal::BoundingBox3D< Point, Real >::move(), and animal::BoundingBox3D< Point, Real >::shift(). |