GeoDirectedLine.h
Go to the documentation of this file.
1 /**
2  * \file GeoDirectedLine.h
3  *
4  * \ingroup GeoAlgo
5  *
6  * \brief Class def header for a class DirectedLine
7  *
8  * @author David Caratelli
9  */
10 
11 /** \addtogroup GeoAlgo
12 
13  @{*/
14 #ifndef BASICTOOL_GEODIRECTEDLINE_H
15 #define BASICTOOL_GEODIRECTEDLINE_H
16 
19 
20 namespace geoalgo {
21 
22  class HalfLine;
23 
24  /**
25  \class DirectedLine
26  @brief Representation of a 3D infinite line.
27  Defines an infinite 3D line with a point and a direction.
28  Line points are constructed like this:
29  (pt, dir) -> (pt, pt+dir)
30  It hides the point attributes from users for protecting the dimensionality.
31  */
32  class DirectedLine : public Line {
33 
34  public:
35 
36  /// Default ctor
37  DirectedLine();
38 
39  /// Alternative ctor (1)
40  DirectedLine(const double x, const double y, const double z,
41  const double dirx, const double diry, const double dirz);
42 
43  /// Altenartive ctor (2)
44  DirectedLine(const Point_t& pt, const Vector_t& dir);
45 
46  /// Alternative ctor (3)
47  DirectedLine(const HalfLine& l);
48 
49  /// Alternative ctor using template (3)
50  template <class T, class U> DirectedLine(const T& pt, const U& dir)
51  : Line(Point_t(pt), Point_t(pt+dir))
52  {}
53 
54  Vector_t Dir() const;
55 
56  };
57 
59 }
60 #endif
61 /** @} */ // end of doxygen group
DirectedLine(const T &pt, const U &dir)
Alternative ctor using template (3)
DirectedLine()
Default ctor.
Class def header for a class Line.
string dir
DirectedLine DirectedLine_t
static QStrList * l
Definition: config.cpp:1044
Class def header for a class Point and Vector.
Vector_t Dir() const
Representation of a 3D infinite line. Defines an infinite 3D line by having 2 points which completely...
Definition: GeoLine.h:27
Representation of a 3D infinite line. Defines an infinite 3D line with a point and a direction...
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (P...
Definition: GeoHalfLine.h:30
list x
Definition: train.py:276