diff --git a/Ball.cpp b/Ball.cpp index 8e01d60..64d0bec 100644 --- a/Ball.cpp +++ b/Ball.cpp @@ -1,9 +1,18 @@ #include "Ball.hpp" #include -Ball::Ball(Point& _center, double _p, double _q) : Center(_center), - init_h(_center.z), bounce_number(0), crt_time(0), T(0), A(_center.z), B(0), - U(sqrt(2 * G_CTE * _center.z)), surface(_center, _p, _q) {} +Ball::Ball(Point& _center, double _p, double _q) : + Center(_center), + surface(_center, _p, _q), + init_h(_center.z), + bounce_number(0), + crt_time(0), + A(_center.z), + B(0), + U(sqrt(2 * G_CTE * _center.z)), + T(0) +{ +} void Ball::_compute_pos() { Center.x = A + B * crt_time - (G_CTE / 2) * crt_time * crt_time; diff --git a/spheroid.hpp b/spheroid.hpp index ae6c80b..2982f44 100644 --- a/spheroid.hpp +++ b/spheroid.hpp @@ -28,9 +28,9 @@ class Spheroid : public ImplicitSurface { * V is the volume. Extremely useful to have a constant volume in the * ball **/ - size_t stiffness; - double p, q; - double V; Point& center; + double p, q; + size_t stiffness; + double V; void _compute_volume(); };