cosmetix
[k8-jellyphysics.git] / src / jelly / PointMass.h
bloba7a1a27fb70dc7ae410e25801d0a2c8571e5df21
1 #ifndef _POINT_MASS_H
2 #define _POINT_MASS_H
4 #include "Vector2.h"
7 namespace JellyPhysics {
9 class PointMass {
10 public:
11 PointMass () : Mass(0), Position(Vector2::Zero), Velocity(Vector2::Zero), Force(Vector2::Zero), lastElapsed(0), lastElapMass(1) {}
12 PointMass (float mass, const Vector2 &pos);
14 void integrateForce (float elapsed);
16 public:
17 float Mass;
18 Vector2 Position;
19 Vector2 Velocity;
20 Vector2 Force;
22 private:
23 float lastElapsed;
24 float lastElapMass;
30 #endif