--- a/src/PhysicsObject.hh Sat Dec 06 20:56:24 2008 +0000
+++ b/src/PhysicsObject.hh Sat Dec 06 21:02:35 2008 +0000
@@ -34,6 +34,8 @@
bool alive;
bool shouldDelete;
+ PhysicsObject *pivot;
+
PhysicsObject(PhysicsWorld &world, float mass, Vector position,
Vector velocity, bool enabled = true);
virtual ~PhysicsObject (void);
@@ -219,6 +221,16 @@
bool removeIfDestroyed (void);
/**
+ * Sets this object's pivot to the given value, which will then exert a force on this object
+ */
+ void setPivot (PhysicsObject *pivot);
+
+ /**
+ * Compute the force that this object (as a pivot) exerts on the given object
+ */
+ virtual float getPivotForce (PhysicsObject *bob);
+
+ /**
* Update object in physics simulation.
*/
virtual void tick (TimeMS tick_length);