GeoLineSegment.h
Go to the documentation of this file.
1 /**
2  * \file GeoLineSegment.h
3  *
4  * \ingroup GeoAlgo
5  *
6  * \brief Class def header for a class LineSegment
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup GeoAlgo
12 
13  @{*/
14 #ifndef BASICTOOL_GEOLINESEGMENT_H
15 #define BASICTOOL_GEOLINESEGMENT_H
16 
18 
19 namespace geoalgo {
20  /**
21  \class LineSegment
22  @brief Representation of a simple 3D line segment
23  Defines a finite 3D straight line by having the start and end position (Point_t). \n
24  */
25  class LineSegment{
26 
27  public:
28 
29  /// Default constructor
30  LineSegment();
31 
32  /// Default destructor
33  virtual ~LineSegment(){}
34 
35  /// Alternative ctor (1)
36  LineSegment(const double start_x, const double start_y, const double start_z,
37  const double end_x, const double end_y, const double end_z );
38 
39  /// Altenartive ctor (2)
40  LineSegment(const Point_t& start, const Point_t& end);
41 
42  //
43  // Getters
44  //
45  const Point_t& Start() const; ///< Start getter
46  const Point_t& End() const; ///< End getter
47  const Vector_t Dir() const; ///< Direction getter
48 
49  //
50  // Setters
51  //
52  void Start(const double x, const double y, const double z); ///< Start setter
53  void End (const double x, const double y, const double z); ///< End setter
54 
55  protected:
56 
57  void DirReset(); ///< Internal function to reset direction
58  Point_t _start; ///< Start position of a line
59  Point_t _end; ///< End position of a line
60  Vector_t _dir; ///< Direction
61 
62  public:
63 
64  //
65  // Template
66  //
67  /// Alternative ctor using template (3)
68  template <class T, class U> LineSegment(const T& start, const U& end)
69  : LineSegment(Point_t(start), Point_t(end))
70  {}
71 
72 
73  };
74 
76 }
77 
78 #endif
79 /** @} */ // end of doxygen group
80 
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Representation of a simple 3D line segment Defines a finite 3D straight line by having the start and ...
const Vector_t Dir() const
Direction getter.
Vector_t _dir
Direction.
LineSegment LineSegment_t
Class def header for a class Point and Vector.
LineSegment(const T &start, const U &end)
Alternative ctor using template (3)
const Point_t & End() const
End getter.
LineSegment()
Default constructor.
Point_t _end
End position of a line.
const Point_t & Start() const
Start getter.
Point_t _start
Start position of a line.
void DirReset()
Internal function to reset direction.
list x
Definition: train.py:276
virtual ~LineSegment()
Default destructor.