/*! * @file CollisionPlane.h * @brief Collision logic for an infinite plane * * Simplest collision, used for floor and global bounding box */ #ifndef COLLISIONPLANE_H #define COLLISIONPLANE_H #include #include "Collision/Collision.h" #include "cppTypes.h" /*! * Class to represent infinite collision planes (like a flat ground). */ template class CollisionPlane : public Collision { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW /*! * Construct a new collision plane * @param mu : coefficient of friction * @param restitution : rebounding ratio (v+/v-) * @param height : height of this plane */ CollisionPlane(const T& mu, const T& restitution, const T& height) : Collision(mu, restitution), _height(height) {} virtual ~CollisionPlane() {} virtual bool ContactDetection(const Vec3& cp_pos, T& penetration, Mat3& cp_frame); private: T _height; }; #endif // COLLISION_PLANE_H