Cheetah Software  1.0
Collision.h
Go to the documentation of this file.
1 
8 #ifndef COLLISION_H
9 #define COLLISION_H
10 
11 #include "cppTypes.h"
12 
16 template <typename T>
17 class Collision {
18  public:
24  Collision(const T& mu, const T& resti) : _mu(mu), _restitution_coeff(resti) {}
25  virtual ~Collision() {}
26 
35  virtual bool ContactDetection(const Vec3<T>& cp_pos, T& penetration,
36  Mat3<T>& cp_frame) = 0;
37 
38  const T& getFrictionCoeff() { return _mu; }
39  const T& getRestitutionCoeff() { return _restitution_coeff; }
40 
41  protected:
43 };
44 
45 #endif // COLLISION_H
const T & getFrictionCoeff()
Definition: Collision.h:38
typename Eigen::Matrix< T, 3, 3 > Mat3
Definition: cppTypes.h:54
typename Eigen::Matrix< T, 3, 1 > Vec3
Definition: cppTypes.h:26
virtual bool ContactDetection(const Vec3< T > &cp_pos, T &penetration, Mat3< T > &cp_frame)=0
const T & getRestitutionCoeff()
Definition: Collision.h:39
T _restitution_coeff
Definition: Collision.h:42
Collision(const T &mu, const T &resti)
Definition: Collision.h:24
virtual ~Collision()
Definition: Collision.h:25