ESyS-Particle  2.3.2
BTriangleInteraction.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 __BTRIANGLEINTERACTION_H
14 #define __BTRIANGLEINTERACTION_H
15 
16 // -- Project includes --
17 #include "Foundation/vec3.h"
18 #include "Geometry/Triangle.h"
19 #include "Model/Particle.h"
20 #include "Model/BTriMeshIP.h"
22 
32 {
33  private:
36  double m_k;
37  double m_break;
38  double m_dist;
39  int m_tid;
40  int m_pid;
41 
42  Vec3 m_ap; // anchor point in local triangle coords.
47  bool m_inner_flag;
48 
49  public:
52 
55  virtual ~BTriangleInteraction();
56 
57  bool isInner(){return m_inner_flag;};
58  virtual void calcForces();
59  bool broken();
60  virtual Vec3 getPos()const {return m_p->getPos();}; // ??
61  inline int getPid() const {return m_pid;};
62  inline int getTid() const {return m_tid;};
63  Vec3 getAP() const;
64  virtual void setPP(CParticle* part_p){m_p=part_p;};
65  virtual void setTP(Triangle* tri_p){m_t=tri_p;};
66 
67  friend class TML_PackedMessageInterface;
68 };
69 #endif //__BTRIANGLEINTERACTION_H