ESyS-Particle  2.3.2
Edge.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 __EDGE_H
14 #define __EDGE_H
15 
16 //-- Project includes --
17 #include "Foundation/vec3.h"
18 #include "Geometry/Triangle.h"
19 #include "Geometry/AEdge.h"
20 
21 //-- STL includes --
22 #include <utility>
23 
24 using std::pair;
25 using std::make_pair;
26 
35 class Edge : public AEdge
36 {
37  private:
39  int m_id1,m_id2;
40 
41  public:
42  Edge(int,int,const Vec3&,const Vec3&);
43  Edge(int,int,const Vec3&,const Vec3&,Triangle*);
44  Edge(int,int,const Vec3&,const Vec3&,Triangle*,Triangle*);
45 
46  bool isValidContact(const Vec3&) const;
47  Vec3 getBoundingBoxMin() const;
48  Vec3 getBoundingBoxMax() const;
49  Vec3 getDirectionFromPoint(const Vec3&) const;
50  void moveNode(int,const Vec3&);
51  void move(const Vec3&);
52  void applyForce(const Vec3 &f);
53 
54  pair<int,int> getIDs() const {return make_pair(m_id1,m_id2);};
55 
56  friend ostream& operator << (ostream&,const Edge&);
57 };
58 #endif // __EDGE_H