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 
20 
21 namespace geoalgo {
22  /**
23  \class Cylinder
24  @brief Representation of a 3D Cylinder volume.
25  A Cylinder object inherits from a geoalgo::Line
26  @remark input:
27  * 2 points, which define the line representing
28  the central axis of the cylinder
29  * a radius, defining the radius of the cylinder
30  */
31  class Cylinder : public Line {
32 
33  public:
34 
35  /// Default constructor
36  Cylinder();
37 
38  /// Default destructor
39  virtual ~Cylinder(){};
40 
41  /// Alternative ctor (0)
42  Cylinder(const double x_min, const double y_min, const double z_min,
43  const double x_max, const double y_max, const double z_max,
44  const double radius);
45 
46  /// Altenartive ctor (1)
47  Cylinder(const Point_t& min, const Vector_t& max, const double radius);
48 
49  /// Containment evaluation
50  bool Contain(const Point_t &pt) const; ///< Test if a point is contained within the box
51 
52  /// Getters
53  double GetRadius() { return _radius; }
54  /// Setters
55  void SetRadius(double r) { _radius = r; }
56 
57  protected:
58 
59  double _radius; ///< Radius of the cylinder
60 
61  // geoalgo utility
63 
64  };
65 
67 }
68 #endif
69 /** @} */ // end of doxygen group
Algorithm to compute various geometrical relation among geometrical objects. In particular functions ...
Definition: GeoAlgo.h:43
Class def header for a class Line.
double _radius
Radius of the cylinder.
Definition: GeoCylinder.h:59
Class def header for a class Point and Vector.
double GetRadius()
Getters.
Definition: GeoCylinder.h:53
void SetRadius(double r)
Setters.
Definition: GeoCylinder.h:55
Cylinder()
Default constructor.
Definition: GeoCylinder.cxx:6
Representation of a 3D infinite line. Defines an infinite 3D line by having 2 points which completely...
Definition: GeoLine.h:27
static int max(int a, int b)
bool Contain(const Point_t &pt) const
Containment evaluation.
Definition: GeoCylinder.cxx:26
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
Representation of a 3D Cylinder volume. A Cylinder object inherits from a geoalgo::Line.
Definition: GeoCylinder.h:31
Class def header for a class GeoAlgo.
Cylinder Cylinder_t
Definition: GeoCylinder.h:66
virtual ~Cylinder()
Default destructor.
Definition: GeoCylinder.h:39