Cheetah Software  1.0
CollisionPlane.cpp
Go to the documentation of this file.
2 
9 template <typename T>
10 bool CollisionPlane<T>::ContactDetection(const Vec3<T>& cp_pos, T& penetration,
11  Mat3<T>& cp_frame) {
12  if (cp_pos[2] < _height) {
13  penetration = cp_pos[2] - _height;
14  cp_frame.setIdentity();
15  return true;
16  } else {
17  return false;
18  }
19 }
20 
21 template class CollisionPlane<double>;
22 template class CollisionPlane<float>;
typename Eigen::Matrix< T, 3, 3 > Mat3
Definition: cppTypes.h:54
typename Eigen::Matrix< T, 3, 1 > Vec3
Definition: cppTypes.h:26
Collision logic for an infinite plane.
virtual bool ContactDetection(const Vec3< T > &cp_pos, T &penetration, Mat3< T > &cp_frame)