All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
larcorealg/larcorealg/GeoAlgo/GeoCone.h
Go to the documentation of this file.
1 /**
2  * \file GeoCone.h
3  *
4  * \ingroup GeoAlgo
5  *
6  * \brief Class def header for a class HalfLine
7  *
8  * @author David Caratelli
9  */
10 
11 /** \addtogroup GeoAlgo
12 
13  @{*/
14 #ifndef BASICTOOL_GEOCONE_H
15 #define BASICTOOL_GEOCONE_H
16 
19 namespace geoalgo {
20  /**
21  \class Cone
22  @brief Representation of a 3D semi-infinite line.
23  Defines a 3D cone with the following properties: \n
24  Start point (or vertex), Direction, Length (or Length), Radius, opening angle \n
25  When 2 of Length, Radius, opening angle are defined the third is automatically set
26  */
27  class Cone : public HalfLine {
28 
29  public:
30 
31  /// Default constructor
32  Cone();
33 
34  /// Default destructor
35  virtual ~Cone(){};
36 
37  /// Alternative ctor (1)
38  Cone(const double x, const double y, const double z,
39  const double dirx, const double diry, const double dirz,
40  const double length, const double radius);
41 
42  /// Alternative ctor (2)
43  Cone(const Point_t& start, const Vector_t& dir,
44  const double length, const double radius);
45 
46  //
47  // Getters
48  //
49  double Length() const; ///< Length getter
50  double Radius() const; ///< Length getter
51  double Angle () const; ///< Angle getter
52 
53  //
54  // Setters
55  //
56  void Length(const double l); ///< Length setter
57  void Radius(const double r); ///< Radius setter
58 
59  protected:
60 
61  double _length; ///< Helight (length) of the cone
62  double _radius; ///< Radius of the cone at the base
63  double _angle; ///< Opening Angle
64 
65  public:
66  //
67  // Template
68  //
69  /// Alternative ctor using template (3)
70  template <class T, class U> Cone(const T& start, const U& dir)
71  : Cone(Point_t(start), Vector_t(dir))
72  {}
73 
74  };
75 
76  typedef Cone Cone_t;
77 }
78 #endif
79 /** @} */ // end of doxygen group
80 
process_name opflash particleana ie ie ie z
double _radius
Radius of the cone at the base.
process_name opflash particleana ie x
double _length
Helight (length) of the cone.
double Length() const
Length getter.
Representation of a 3D semi-infinite line. Defines a 3D cone with the following properties: Start po...
process_name opflash particleana ie ie y
Cone(const T &start, const U &dir)
Alternative ctor using template (3)
virtual ~Cone()
Default destructor.
tuple dir
Definition: dropbox.py:28
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (P...
double Angle() const
Angle getter.
double Radius() const
Length getter.
esac echo uname r