# cODEWorld Class Reference
[Module - ODE Dynamics Engine (Rigid Body Simulation)]

cODEWorld implements a virtual world to handle ODE based objects (cODEGenericBody). More...

`#include <CODEWorld.h>`

Inheritance diagram for cODEWorld:

[legend]

List of all members.

## Public Member Functions
| cODEWorld (cWorld *a_parentWorld)
| Constructor of cODEWorld.
| ~cODEWorld ()
| Destructor of cODEWorld.
void | setGravity (cVector3d a_gravity)
| Set gravity field.
cVector3d | getGravity ()
| Read gravity field.
void | setLinearDamping (double a_value)
| Set linear damping.
void | setAngularDamping (double a_value)
| Set angular damping.
void | setMaxAngularSpeed (double a_value)
| Set max angular speed.
void | updateDynamics (double a_interval)
| compute dynamic simulation.
void | updateBodyPositions (void)
| update position and orientation from ode models to chai models.
void | updateGlobalPositions (const bool a_frameOnly)
## Public Attributes
list< cODEGenericBody * > | m_bodies
| List of ODE dynamic bodies.
dWorldID | m_ode_world
| ODE dynamics world.
dSpaceID | m_ode_space
| ODE collision space.
dJointGroupID | m_ode_contactgroup
| ODE contact group.

## Detailed Description

cODEWorld implements a virtual world to handle ODE based objects (cODEGenericBody).

## Constructor & Destructor Documentation

cODEWorld::cODEWorld | ( | cWorld * | a_parentWorld | ) |

Constructor of cODEWorld.

Constructor of cODEWorld.

Parameters:

  | a_parentWorld | Pointer to parent CHAI 3D world.

Returns:
  Return pointer to new cODEWorld instance.

## Member Function Documentation

cVector3d cODEWorld::getGravity | ( |  | ) |

Read gravity field.

Read the current gravity field.

Returns:
  Return current gravity field.

void cODEWorld::setGravity | ( | cVector3d | a_gravity | ) |

Set gravity field.

Define a gravity field.

Parameters:

  | a_gravity | Gravity field.

void cODEWorld::updateBodyPositions | ( | void |  | ) |

update position and orientation from ode models to chai models.

Update position and orientation from ode models to chai models.

void cODEWorld::updateDynamics | ( | double | a_interval | ) |

compute dynamic simulation.

Compute simulation for a_time time interval.

Parameters:

  | a_interval | Time increment.

void cODEWorld::updateGlobalPositions | ( | const bool | a_frameOnly | ) | `[virtual]`

Compute globalPos and globalRot given the localPos and localRot of this object and its parents. Optionally propagates to children.

If a_frameOnly is set to false, additional global positions such as vertex positions are computed (which can be time-consuming).

Parameters:

  | a_frameOnly | If true then only the global frame is computed.

Reimplemented from cGenericObject.

The documentation for this class was generated from the following files:

- D:/CHAI3D/build-2-0-0/2.0.0/win32/modules/ODE/CODEWorld.h
- D:/CHAI3D/build-2-0-0/2.0.0/win32/modules/ODE/CODEWorld.cpp

CHAI3D 2.0.0 documentation
Please address any questions to support@chai3d.org
(C) 2003-2009 - CHAI 3D
All Rights Reserved.