GeoLineSegment.cxx
Go to the documentation of this file.
3 
4 namespace geoalgo {
5 
7  : _start(3)
8  , _end(3)
9  , _dir(3)
10  {DirReset();}
11 
12  LineSegment::LineSegment(const double start_x, const double start_y, const double start_z,
13  const double end_x, const double end_y, const double end_z )
14  : _start ( start_x, start_y, start_z )
15  , _end ( end_x, end_y, end_z )
16  , _dir (3)
17  {DirReset();}
18 
20  : _start ( start )
21  , _end ( end )
22  , _dir (3)
23  {
24  if(start.size()!=3 || end.size()!=3)
25  throw GeoAlgoException("LineSegment ctor accepts only 3D Point!");
26  DirReset();
27  }
28 
29  const Point_t& LineSegment::Start() const { return _start; }
30 
31  const Point_t& LineSegment::End() const { return _end; }
32 
33  const Vector_t LineSegment::Dir() const { return _dir; }
34 
35  void LineSegment::Start(const double x, const double y, const double z)
36  { _start[0] = x; _start[1] = y; _start[2] = z;
37  DirReset();
38  }
39 
40  void LineSegment::End(const double x, const double y, const double z)
41  { _end[0] = x; _end[1] = y; _end[2] = z;
42  DirReset();
43  }
44 
46 
47 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Class def header for a class GeoAlgoException.
const Vector_t Dir() const
Direction getter.
Vector_t _dir
Direction.
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.
Class def header for a class LineSegment.
list x
Definition: train.py:276