Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Orion3D physic engine

In this page, we will give an in-depth explanation of how the design of the Orion3D physic engine. We will not review the maths and physic derivations of how all this stuff works. This is up to you to read the inline documentation (formula are always expanded).

A brief overview

What is a physic engine ?

What is a physic engine ?

The main feature of this physic engine is it's modularity. It is fully object oriented, and it's easy to derive new class and implement new forces, constraints, etc. Althought it is not really optimised yet, it use powerfull maths algorithms (sparse systems resolution, etc), and should be easy to tuned for real time applications.

Here are the main layers of the physic engine :

The rigid body

What is a rigid body ?

How to link a rigid body with \b Orion3D object ?

Particules system

What is a particules system ?

A particule system is a list of poncutal particules (class OR_Particule), that move according to ponctual mecanics.

How to use a particule system ?

Collision detection

The different kind of colliders

To track the collision between two objects (called the collidees), Orion3D uses colliders. According to the kind of objects pairs, there are for the moment two main different colliders :

All collider inherit from base class OR_Collider_ABC and have to overload mainly one method : \begincode virtual void PerformCollisionDetection( OR_CollisionManager& CollisionManager )=0; This is the method that is called by the physic engine (in fact by the manager of colliders) to resolve the collision between the two collidee.

The main advantage of using collider is to provide a high level control over the way collision is performed. For example, collision between to object can easyly be turn on/off simply by disabling the collider (a complete list of such methods are provided by OR_Collider_ABC).

The rigid body colliders

The rigid body collider use OPCODE collision detection library to check the collisions between its two rigid body collidee. To perform this task, it keeps in its internal two OPCODE objects that tracks the relative positions of the two rigid body :

The rigid body collider, at its creation, is responsible for insitializing these both object (linking the cache with the OPCODE model, set up the tree collider options, ...).

Linkage between Orion3D and OPCODE

There are two kind of datas that OPCODE used :

The class OR_PhysicModel links the OPCODE model with Orion3D mesh. An OR_PhysicModel must be specified for each rigid body (class OR_RigidBody) that is used in a rigid body collider.

The collision manager

Constraint resolution

What is a constraint ?

What is a joint ?

The joint manager


Orion3D Source Code Documentation - Generated on 3 May 2002 - Copyright © Gabriel & Antoche