- data/levels/default/ moved to data/levels/worldmap/
[supertux.git] / src / physic.h
index 81e4451..002b42f 100644 (file)
@@ -1,14 +1,22 @@
+//  $Id$
+// 
+//  SuperTux
+//  Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
 //
-// C++ Interface: physic
-//
-// Description: 
-//
-//
-// Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
-//
-// Copyright: See COPYING file that comes with this distribution
-//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License
+//  as published by the Free Software Foundation; either version 2
+//  of the License, or (at your option) any later version.
 //
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+// 
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+//  02111-1307, USA.
 
 #ifndef SUPERTUX_PHYSIC_H
 #define SUPERTUX_PHYSIC_H
@@ -28,6 +36,9 @@ public:
     /** sets velocity to a fixed value */
     void set_velocity(float vx, float vy);
 
+    void set_velocity_x(float vx);
+    void set_velocity_y(float vy);
+
     /** velocities invertion */
     void inverse_velocity_x();
     void inverse_velocity_y();
@@ -40,6 +51,9 @@ public:
      */
     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();
 
@@ -49,6 +63,9 @@ public:
     /** applies the physical simulation to given x and y coordinates */
     void apply(float frame_ratio, float &x, float &y); 
 
+    /** applies the physical simulation to given x and y coordinates */
+    void apply(Vector& vector, float frame_ratio);
+
 private:
     /// horizontal and vertical acceleration
     float ax, ay;