LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
GeoLineSegment.h
Go to the documentation of this file.
1 
14 #ifndef BASICTOOL_GEOLINESEGMENT_H
15 #define BASICTOOL_GEOLINESEGMENT_H
16 
17 #include "GeoVector.h"
18 
19 namespace geoalgo {
25  class LineSegment{
26 
27  public:
28 
30  LineSegment();
31 
33  virtual ~LineSegment(){}
34 
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 
40  LineSegment(const Point_t& start, const Point_t& end);
41 
42  //
43  // Getters
44  //
45  const Point_t& Start() const;
46  const Point_t& End() const;
47  const Vector_t Dir() const;
48 
49  //
50  // Setters
51  //
52  void Start(const double x, const double y, const double z);
53  void End (const double x, const double y, const double z);
54 
55  protected:
56 
57  void DirReset();
61 
62  public:
63 
64  //
65  // Template
66  //
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 
Float_t x
Definition: compare.C:6
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
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.
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
virtual ~LineSegment()
Default destructor.