LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
GeoAABox.h
Go to the documentation of this file.
1 
14 #ifndef BASICTOOL_GEOAABOX_H
15 #define BASICTOOL_GEOAABOX_H
16 
17 #include "GeoHalfLine.h"
18 
19 namespace geoalgo {
34  class AABox {
35 
36  public:
37 
39  AABox();
40 
42  virtual ~AABox(){};
43 
45  AABox(const double x_min, const double y_min, const double z_min,
46  const double x_max, const double y_max, const double z_max);
47 
49  AABox(const Point_t& min, const Vector_t& max);
50 
51  //
52  // Attribute accessor
53  //
54  const Point_t& Min() const;
55  const Point_t& Max() const;
56  void Min(const double x, const double y, const double z);
57  void Max(const double x, const double y, const double z);
58  bool Contain(const Point_t &pt) const;
59 
60  protected:
61 
64 
65  public:
66 
67  //
68  // Template
69  //
71  template <class T, class U> AABox(const T& min, const U& max)
72  : AABox(Point_t(min), Point_t(max))
73  {}
74 
75  };
76 
77  typedef AABox AABox_t;
78 }
79 #endif
80  // end of doxygen group
81 
Float_t x
Definition: compare.C:6
AABox()
Default constructor.
Definition: GeoAABox.cxx:8
Class def header for a class HalfLine.
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
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): .
Definition: GeoAABox.h:34
Point_t _max
Maximum point.
Definition: GeoAABox.h:63
Point_t _min
Minimum point.
Definition: GeoAABox.h:62
const Point_t & Min() const
Minimum point getter.
Definition: GeoAABox.cxx:27
double x_min
Definition: berger.C:15
Int_t max
Definition: plot.C:27
AABox(const T &min, const U &max)
Alternative ctor using template (3)
Definition: GeoAABox.h:71
bool Contain(const Point_t &pt) const
Test if a point is contained within the box.
Definition: GeoAABox.cxx:35
TMarker * pt
Definition: egs.C:25
double x_max
Definition: berger.C:16
virtual ~AABox()
Default destructor.
Definition: GeoAABox.h:42
Int_t min
Definition: plot.C:26
AABox AABox_t
Definition: GeoAABox.h:77
const Point_t & Max() const
Maximum point getter.
Definition: GeoAABox.cxx:28