Changes

Jump to: navigation, search

Team Guardian Physics

116 bytes added, 03:53, 6 April 2011
Framework Breakdown
The framework consists of a physics simulator (PhysicsScene) and a collision space (SimpleCollisionSpace). They are designed to work relatively independently using a set a of joint interfaces.
Let's first look at the physics-only components: === Physics === ==== PhysicsScene ====
<pre>#include "iPhysicsScene.h"</pre>
This is sufficient to add physics simulation support to Chris' framework. This won't magically cause your objects to suddenly start moving around and reacting to gravity however. To do that, each object that should be simulated by the simulator must be associated with a RigidBody. It is also possible to use a PhysicsFrame in a similar role, more on that later.
==== RigidBody ====
<pre>#include "iRigidBody.h"</pre>
; virtual RBDynamics& getDynamics() : Returns a reference to the RBDynamics struct. The public properties of the struct can be directly edited in this way. The physics simulator will update these properties every frame.
; virtual void Delete() const : Deletes this RigidBody and its RBDynamics instance. Does not delete the associated object or any associated collision listeners.
 
=== Collision ===
 
==== CollisionSpace ====
== Listening For Collisions ==

Navigation menu