Looks after (but doesn't own) a collection of bodies and runs their updates. Doesn't deal with collision detection - it will get passes a collision detector to do that. In the vast majority of cases there will be only one physics system, and it is consequently very annoying if every object has to keep track of which physics system it's associated with. Therefore, PhysicsSystem supports a "singleton" style use, but it also lets the user change the "current" physics system (bad things will happen if you set it to zero whilst there are still physical objects!). If you want more than one physics system, then in your update loop set the physics system to the first one, run physics, then set it to the second one etc. Note that the physics system constructor and destructor will set the current physics system variable, so under normal circumstances you don't need to worry about this.

Namespace: JigLibX.Physics
Assembly: JigLibX (in JigLibX.dll) Version: 0.3.1.0

Syntax

C#
public class PhysicsSystem
Visual Basic
Public Class PhysicsSystem
Visual C++
public ref class PhysicsSystem

Inheritance Hierarchy

System..::..Object
  JigLibX.Physics..::..PhysicsSystem

See Also