Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::World Class Reference

World encapsulates an ODE world object. More...

#include <world.h>

Inheritance diagram for oxygen::World:

Inheritance graph
[legend]
Collaboration diagram for oxygen::World:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 World ()
virtual ~World ()
dWorldID GetODEWorld () const
 returns the ID of the managed ODE world
void SetGravity (const salt::Vector3f &gravity)
 sets the gravity vector of this vorld
void SetERP (float erp)
 sets the Error Reduction Parameter of this world.
float GetERP () const
 returns the Error Reduction Parameter of this World.
void SetCFM (float cfm)
 sets the Constraint Force mixing (CFM) value.
float GetCFM () const
 returns the Constraint Force mixing (CFM) value.
void Step (float deltaTime)
 steps the world deltatime forward, i.e.

Protected Member Functions

virtual bool ConstructInternal ()
 creates them managed ODE world

Private Attributes

dWorldID mODEWorld
 the dynamics world represented by this object

Detailed Description

World encapsulates an ODE world object.

It is a container for rigid bodies and joints. Objects in different worlds can not interact, for example rigid bodies from two different worlds can not collide. All the objects in a world exist at the same point in time, thus one reason to use separate worlds is to simulate systems at different rates.

Definition at line 37 of file world.h.


Constructor & Destructor Documentation

World::World  ) 
 

Definition at line 27 of file world.cpp.

World::~World  )  [virtual]
 

Definition at line 31 of file world.cpp.

References mODEWorld.


Member Function Documentation

bool World::ConstructInternal  )  [protected, virtual]
 

creates them managed ODE world

Reimplemented from zeitgeist::Object.

Definition at line 80 of file world.cpp.

References mODEWorld.

float World::GetCFM  )  const
 

returns the Constraint Force mixing (CFM) value.

Definition at line 70 of file world.cpp.

References mODEWorld.

float World::GetERP  )  const
 

returns the Error Reduction Parameter of this World.

Definition at line 60 of file world.cpp.

References mODEWorld.

dWorldID World::GetODEWorld  )  const
 

returns the ID of the managed ODE world

Definition at line 41 of file world.cpp.

References mODEWorld.

void World::SetCFM float  cfm  ) 
 

sets the Constraint Force mixing (CFM) value.

If CFM is set to zero, the constraint will be hard. If CFM is set to a positive value, it will be possible to violate the constraint by `pushing on it' (for example, for contact constraints by forcing the two contacting objects together). In other words the constraint will be soft, and the softness will increase as CFM increases. Note that setting CFM to a negative value can have undesirable bad effects, such as instability.

Definition at line 65 of file world.cpp.

References mODEWorld.

void World::SetERP float  erp  ) 
 

sets the Error Reduction Parameter of this world.

The ERP specifies what proportion of a joint error will be fixed during the next simulation step. if ERP=0 then no correcting force is applied and the bodies will eventually drift apart as the simulation proceeds. If ERP=1 then the simulation will attempt to fix all joint error during the next time step. However, setting ERP=1 is not recommended, as the joint error will not be completely fixed due to various internal approximations. A value of ERP=0.1 to 0.8 is recommended (0.2 is the default).

Definition at line 55 of file world.cpp.

References mODEWorld.

void World::SetGravity const salt::Vector3f gravity  ) 
 

sets the gravity vector of this vorld

Definition at line 46 of file world.cpp.

References mODEWorld, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z().

Here is the call graph for this function:

void World::Step float  deltaTime  ) 
 

steps the world deltatime forward, i.e.

performs physics simulation for a deltaTime seconds interval.

Definition at line 75 of file world.cpp.

References mODEWorld.


Member Data Documentation

dWorldID oxygen::World::mODEWorld [private]
 

the dynamics world represented by this object

Definition at line 97 of file world.h.

Referenced by ConstructInternal(), GetCFM(), GetERP(), GetODEWorld(), SetCFM(), SetERP(), SetGravity(), Step(), and ~World().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:46:50 2006 for rcssserver3d by  doxygen 1.4.4