/** * Defines an ellispoid, which is a basic interpretaion of the ball when it is * bouncing. **/ #include #include "Implicit.hpp" #include "common_structures.hpp" const double PI = 3.141592653589793; class Ellipsoid : public ImplicitSurface { public: Ellipsoid(Point& _center, size_t _p, size_t _q); void update_center_pos(size_t dt); void set_stiffness(size_t _stiffness); private: /** * p corresponds to the half-height of the ball, * q to the radius of the ball, * V is the volume. Extremely useful to have a constant volume in the * ball **/ size_t stiffness; size_t p, q; double V; Point& center; void _compute_volume(); void _compute_pos(size_t t); };