GenGeo  1.1
Line2D.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2007-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 __LINE2D_H
14 #define __LINE2D_H
15 
16 // --- Project includes ---
17 #include "util/vector3.h"
18 #include "AGeometricObject.h"
19 
20 // --- IO includes ---
21 #include <iostream>
22 
23 using std::ostream;
24 
28 class Line2D : public AGeometricObject
29 {
30  protected:
33 
34  public:
35  Line2D();
36  Line2D(const Vector3&,const Vector3&);
37 
38  Vector3 intersect(const Line2D&);
39  Line2D parallel(double);
40  virtual double getDist(const Vector3&) const;
41  Vector3 getOrig() const {return m_p1;};
42  Vector3 getNormal() const {return m_normal;};
43 
44  friend ostream& operator<< (ostream&, const Line2D&);
45 };
46 
47 #endif // __LINE2D_H