Projects/ODE

ODE


The Nature of ODE Objects

ODE describes objects inside itís engine using 2 ëclassesí, geometry, and body. Geometry defines the collision surface of an object. Body defines the physical body that is subject to forces, with a mass and centre of gravity. A geometry is bound to a body, so when forces are applied to the body, the geometry moves, and when the geometry collides, the body reacts.


A Typical Simulation

A typical simulation will proceed like this:

  1. Create a dynamics world.
  2. Create bodies in the dynamics world.
  3. Set the state (position etc) of all bodies.
  4. Create joints in the dynamics world.
  5. Attach the joints to the bodies.
  6. Set the parameters of all joints.
  7. Create a collision world and collision geometry objects, as necessary.
  8. Create a joint group to hold the contact joints.
  9. Loop:
    • Apply forces to the bodies as necessary.
    • Adjust the joint parameters as necessary.
    • Call collision detection.
    • Create a contact joint for every collision point, and put it in the contact joint group.
    • Take a simulation step.
    • Remove all joints in the contact joint group.
  10. Destroy the dynamics and collision worlds.

References