![]() |
LArSoft
v10_06_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Representation of a 3D rectangular box which sides are aligned w/ coordinate axis. A representation of an Axis-Aligned-Boundary-Box, a simple & popular representation of
3D boundary box for collision detection. The concept was taken from the reference,
Real-Time-Collision-Detection (RTCD), and in particular Ch. 4.2 (page 77):
.
More...
#include "GeoAABox.h"
Public Member Functions | |
| AABox () | |
| Default constructor. More... | |
| virtual | ~AABox () |
| Default destructor. More... | |
| AABox (double const x_min, double const y_min, double const z_min, double const x_max, double const y_max, double const z_max) | |
| Alternative ctor (0) More... | |
| AABox (Point_t const &min, Vector_t const &max) | |
| Altenartive ctor (1) More... | |
| Point_t const & | Min () const |
| Minimum point getter. More... | |
| Point_t const & | Max () const |
| Maximum point getter. More... | |
| void | Min (double const x, double const y, double const z) |
| Minimum point setter. More... | |
| void | Max (double const x, double const y, double const z) |
| Maximum point setter. More... | |
| bool | Contain (Point_t const &pt) const |
| Test if a point is contained within the box. More... | |
| template<class T , class U > | |
| AABox (T const &min, U const &max) | |
| Alternative ctor using template (3) More... | |
Protected Attributes | |
| Point_t | _min |
| Minimum point. More... | |
| Point_t | _max |
| Maximum point. More... | |
Representation of a 3D rectangular box which sides are aligned w/ coordinate axis. A representation of an Axis-Aligned-Boundary-Box, a simple & popular representation of
3D boundary box for collision detection. The concept was taken from the reference,
Real-Time-Collision-Detection (RTCD), and in particular Ch. 4.2 (page 77):
.
Ref: http://realtimecollisiondetection.net
This class uses one of the simplest representation for AABox: "min-max" representation.
Though this method requires storing 6 floating point values, class attributes (i.e.
"min" and "max" points) store intuitive values for most UB analyzers. Also it simplifies
utility function implementations.
Definition at line 34 of file GeoAABox.h.
| geoalgo::AABox::AABox | ( | ) |
|
inlinevirtual |
| geoalgo::AABox::AABox | ( | double const | x_min, |
| double const | y_min, | ||
| double const | z_min, | ||
| double const | x_max, | ||
| double const | y_max, | ||
| double const | z_max | ||
| ) |
|
inline |
| bool geoalgo::AABox::Contain | ( | Point_t const & | pt | ) | const |
Test if a point is contained within the box.
Definition at line 45 of file GeoAABox.cxx.
Referenced by geoalgo::GeoAlgo::_SqDist_(), geoalgo::GeoAlgo::BoxOverlap(), and ~AABox().
| Point_t const & geoalgo::AABox::Max | ( | ) | const |
Maximum point getter.
Definition at line 27 of file GeoAABox.cxx.
References _max.
Referenced by geoalgo::GeoAlgo::_ClosestPt_(), geoalgo::GeoAlgo::_SqDist_(), geoalgo::GeoObjCollection::Add(), geoalgo::GeoAlgo::Intersection(), and ~AABox().
| void geoalgo::AABox::Max | ( | double const | x, |
| double const | y, | ||
| double const | z | ||
| ) |
| Point_t const & geoalgo::AABox::Min | ( | ) | const |
Minimum point getter.
Definition at line 23 of file GeoAABox.cxx.
References _min.
Referenced by geoalgo::GeoAlgo::_ClosestPt_(), geoalgo::GeoAlgo::_SqDist_(), geoalgo::GeoObjCollection::Add(), geoalgo::GeoAlgo::ClosestPt(), geoalgo::GeoAlgo::Intersection(), geoalgo::GeoAlgo::SqDist(), and ~AABox().
| void geoalgo::AABox::Min | ( | double const | x, |
| double const | y, | ||
| double const | z | ||
| ) |
|
protected |
|
protected |