Moved some console commands' implementations nearer to target classes
[supertux.git] / src / physic.hpp
index 828b1e1..da44f9b 100644 (file)
@@ -37,6 +37,7 @@ public:
 
   /// Sets velocity to a fixed value.
   void set_velocity(float vx, float vy);
+  void set_velocity(const Vector& vector);
 
   void set_velocity_x(float vx);
   void set_velocity_y(float vy);
@@ -45,8 +46,9 @@ public:
   void inverse_velocity_x();
   void inverse_velocity_y();
 
-  float get_velocity_x();
-  float get_velocity_y();
+  Vector get_velocity() const;
+  float get_velocity_x() const;
+  float get_velocity_y() const;
 
   /// Set acceleration.
   /** Sets acceleration applied to the object. (Note that gravity is
@@ -57,8 +59,9 @@ public:
   void set_acceleration_x(float ax);
   void set_acceleration_y(float ay);
 
-  float get_acceleration_x();
-  float get_acceleration_y();
+  Vector get_acceleration() const;
+  float get_acceleration_x() const;
+  float get_acceleration_y() const;
 
   /// Enables or disables handling of gravity.
   void enable_gravity(bool gravity_enabled);