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 
double _radius
Radius of the cone at the base.
Definition: GeoCone.h:62
double _angle
Opening Angle.
Definition: GeoCone.h:63
Class def header for a class HalfLine.
double _length
Helight (length) of the cone.
Definition: GeoCone.h:61
double Length() const
Length getter.
Definition: GeoCone.cxx:47
string dir
static QStrList * l
Definition: config.cpp:1044
Cone()
Default constructor.
Definition: GeoCone.cxx:9
Representation of a 3D semi-infinite line. Defines a 3D cone with the following properties: Start po...
Definition: GeoCone.h:27
Class def header for a class Point and Vector.
Cone(const T &start, const U &dir)
Alternative ctor using template (3)
Definition: GeoCone.h:70
Cone Cone_t
Definition: GeoCone.h:76
virtual ~Cone()
Default destructor.
Definition: GeoCone.h:35
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (P...
Definition: GeoHalfLine.h:30
double Angle() const
Angle getter.
Definition: GeoCone.cxx:51
list x
Definition: train.py:276
double Radius() const
Length getter.
Definition: GeoCone.cxx:49