#include <CODEWorld.h>
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. |
cODEWorld::cODEWorld | ( | cWorld * | a_parentWorld | ) |
cVector3d cODEWorld::getGravity | ( | ) |
Read gravity field.
Read the current gravity field.
void cODEWorld::setGravity | ( | cVector3d | a_gravity | ) |
Set gravity field.
Define a gravity field.
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.
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).
a_frameOnly | If true then only the global frame is computed. |
Reimplemented from cGenericObject.