Class DefaultRigidBodyPhysicsManager

java.lang.Object
org.xj3d.impl.core.eventmodel.DefaultRigidBodyPhysicsManager
All Implemented Interfaces:
Runnable, NodeManager

public class DefaultRigidBodyPhysicsManager extends Object implements NodeManager, Runnable
Manager for the rigid body physics model nodes.

Keeps track of both the collections of bodies and the individual joints. The collection nodes are evaluated at the end of the frame so as to modify the final object locations for this frame. The joints are managed so that those that need to produce output will be evaluated at the start of the next frame. This requires the manager to register as both pre and post event model node manager, as it manages both sets of nodes, though independently.

The physics model is run at a somewhat fixed frame rate. Physics models don't like to have variable frame rate as input, so we smooth these out over a fixed number of frames. Every set of frame resets the calculation interval based on recent history.

Version:
$Revision: 1.7 $
Author:
Justin Couch