LArSoft
v09_90_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 (const double x_min, const double y_min, const double z_min, const double x_max, const double y_max, const double z_max) | |
Alternative ctor (0) More... | |
AABox (const Point_t &min, const Vector_t &max) | |
Altenartive ctor (1) More... | |
const Point_t & | Min () const |
Minimum point getter. More... | |
const Point_t & | Max () const |
Maximum point getter. More... | |
void | Min (const double x, const double y, const double z) |
Minimum point setter. More... | |
void | Max (const double x, const double y, const double z) |
Maximum point setter. More... | |
bool | Contain (const Point_t &pt) const |
Test if a point is contained within the box. More... | |
template<class T , class U > | |
AABox (const T &min, const U &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 | ( | const double | x_min, |
const double | y_min, | ||
const double | z_min, | ||
const double | x_max, | ||
const double | y_max, | ||
const double | z_max | ||
) |
|
inline |
bool geoalgo::AABox::Contain | ( | const Point_t & | 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().
const Point_t & 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 | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
const Point_t & 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 | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
|
protected |
|
protected |