-void physic_init(physic_type* pphysic);
-int physic_get_state(physic_type* pphysic);
-void physic_set_state(physic_type* pphysic, int nstate);
-float physic_get_velocity(physic_type* pphysic, float start_velocity);
-float physic_get_max_distance(physic_type* pphysic, float start_velocity);
-unsigned int physic_get_max_time(physic_type* pphysic, float start_velocity);
-unsigned int physic_get_time_gone(physic_type* pphysic);
+ /// Velocities invertion.
+ void inverse_velocity_x();
+ void inverse_velocity_y();
+
+ float get_velocity_x();
+ float get_velocity_y();
+
+ /// Set acceleration.
+ /** Sets acceleration applied to the object. (Note that gravity is
+ * eventually added to the vertical acceleration)
+ */
+ void set_acceleration(float ax, float ay);
+
+ void set_acceleration_x(float ax);
+ void set_acceleration_y(float ay);
+
+ float get_acceleration_x();
+ float get_acceleration_y();
+
+ /// Enables or disables handling of gravity.
+ void enable_gravity(bool gravity_enabled);
+
+ Vector get_movement(float elapsed_time);
+
+private:
+ /// horizontal and vertical acceleration
+ float ax, ay;
+ /// horizontal and vertical velocity
+ float vx, vy;
+ /// should we respect gravity in out calculations?
+ bool gravity_enabled;
+};