ESyS-Particle  2.3.2
LineSegment.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __LINE_SEGMENT_H
14 #define __LINE_SEGMENT_H
15 
16 //--- Project includes ---
17 #include "Foundation/vec3.h"
18 #include "Geometry/Line.h"
19 
28 class LineSegment : public Line
29 {
30  private:
31  double m_len;
32 
33  public:
34  LineSegment(const Vec3&,const Vec3&);
35  virtual ~LineSegment(){}
36 
37  virtual double sep(const Vec3&);
38  virtual bool intersect(const Vec3&,const Vec3&);
39  Vec3 getP1() {return Pos;};
40  Vec3 getP2() {return Pos+m_len*U;};
41 };
42 
43 #endif // __LINE_SEGMENT_H