All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoCylinder.h
Go to the documentation of this file.
1 /**
2  * \file GeoCylinder.h
3  *
4  * \ingroup GeoAlgo
5  *
6  * \brief Class def header for a class Cylinder
7  *
8  * @author david caratelli
9  */
10 
11 /** \addtogroup GeoAlgo
12 
13  @{*/
14 #ifndef BASICTOOL_GEOCYLINDER_H
15 #define BASICTOOL_GEOCYLINDER_H
16 
17 #include "GeoAlgo.h"
18 #include "GeoLine.h"
19 
20 namespace geoalgo {
21  /**
22  \class Cylinder
23  @brief Representation of a 3D Cylinder volume.
24  A Cylinder object inherits from a geoalgo::Line
25  @input 2 points, which define the line representing
26  the central axis of the cylinder
27  @input a radius, defining the radius of the cylinder
28  */
29  class Cylinder : public Line {
30 
31  public:
32 
33  /// Default constructor
34  Cylinder();
35 
36  /// Default destructor
37  virtual ~Cylinder(){};
38 
39  /// Alternative ctor (0)
40  Cylinder(const double x_min, const double y_min, const double z_min,
41  const double x_max, const double y_max, const double z_max,
42  const double radius);
43 
44  /// Altenartive ctor (1)
45  Cylinder(const Point_t& min, const Vector_t& max, const double radius);
46 
47  /// Containment evaluation
48  bool Contain(const Point_t &pt) const; ///< Test if a point is contained within the box
49 
50  /// Getters
51  double GetRadius() { return _radius; }
52  /// Setters
53  void SetRadius(double r) { _radius = r; }
54 
55  protected:
56 
57  double _radius; ///< Radius of the cylinder
58 
59  // geoalgo utility
61 
62  };
63 
64  typedef Cylinder Cylinder_t;
65 }
66 #endif
67 /** @} */ // end of doxygen group
68 
Algorithm to compute various geometrical relation among geometrical objects. In particular functions ...
double _radius
Radius of the cylinder.
bool Contain(const Point_t &pt) const
Containment evaluation.
esac echo uname r