ODE  0.13.1
 All Data Structures Functions Variables Typedefs Enumerations Groups
Automatic Enabling and Disabling

Functions

dReal dWorldGetAutoDisableLinearThreshold (dWorldID)
 Get auto disable linear threshold for newly created bodies. More...
 
void dWorldSetAutoDisableLinearThreshold (dWorldID, dReal linear_threshold)
 Set auto disable linear threshold for newly created bodies. More...
 
dReal dWorldGetAutoDisableAngularThreshold (dWorldID)
 Get auto disable angular threshold for newly created bodies. More...
 
void dWorldSetAutoDisableAngularThreshold (dWorldID, dReal angular_threshold)
 Set auto disable angular threshold for newly created bodies. More...
 
dReal dWorldGetAutoDisableLinearAverageThreshold (dWorldID)
 Get auto disable linear average threshold for newly created bodies. More...
 
void dWorldSetAutoDisableLinearAverageThreshold (dWorldID, dReal linear_average_threshold)
 Set auto disable linear average threshold for newly created bodies. More...
 
dReal dWorldGetAutoDisableAngularAverageThreshold (dWorldID)
 Get auto disable angular average threshold for newly created bodies. More...
 
void dWorldSetAutoDisableAngularAverageThreshold (dWorldID, dReal angular_average_threshold)
 Set auto disable angular average threshold for newly created bodies. More...
 
int dWorldGetAutoDisableAverageSamplesCount (dWorldID)
 Get auto disable sample count for newly created bodies. More...
 
void dWorldSetAutoDisableAverageSamplesCount (dWorldID, unsigned int average_samples_count)
 Set auto disable average sample count for newly created bodies. More...
 
int dWorldGetAutoDisableSteps (dWorldID)
 Get auto disable steps for newly created bodies. More...
 
void dWorldSetAutoDisableSteps (dWorldID, int steps)
 Set auto disable steps for newly created bodies. More...
 
dReal dWorldGetAutoDisableTime (dWorldID)
 Get auto disable time for newly created bodies. More...
 
void dWorldSetAutoDisableTime (dWorldID, dReal time)
 Set auto disable time for newly created bodies. More...
 
int dWorldGetAutoDisableFlag (dWorldID)
 Get auto disable flag for newly created bodies. More...
 
void dWorldSetAutoDisableFlag (dWorldID, int do_auto_disable)
 Set auto disable flag for newly created bodies. More...
 
dReal dBodyGetAutoDisableLinearThreshold (dBodyID)
 Get auto disable linear average threshold. More...
 
void dBodySetAutoDisableLinearThreshold (dBodyID, dReal linear_average_threshold)
 Set auto disable linear average threshold. More...
 
dReal dBodyGetAutoDisableAngularThreshold (dBodyID)
 Get auto disable angular average threshold. More...
 
void dBodySetAutoDisableAngularThreshold (dBodyID, dReal angular_average_threshold)
 Set auto disable angular average threshold. More...
 
int dBodyGetAutoDisableAverageSamplesCount (dBodyID)
 Get auto disable average size (samples count). More...
 
void dBodySetAutoDisableAverageSamplesCount (dBodyID, unsigned int average_samples_count)
 Set auto disable average buffer size (average steps). More...
 
int dBodyGetAutoDisableSteps (dBodyID)
 Get auto steps a body must be thought of as idle to disable. More...
 
void dBodySetAutoDisableSteps (dBodyID, int steps)
 Set auto disable steps. More...
 
dReal dBodyGetAutoDisableTime (dBodyID)
 Get auto disable time. More...
 
void dBodySetAutoDisableTime (dBodyID, dReal time)
 Set auto disable time. More...
 
int dBodyGetAutoDisableFlag (dBodyID)
 Get auto disable flag. More...
 
void dBodySetAutoDisableFlag (dBodyID, int do_auto_disable)
 Set auto disable flag. More...
 
void dBodySetAutoDisableDefaults (dBodyID)
 Set auto disable defaults. More...
 

Detailed Description

Every body can be enabled or disabled. Enabled bodies participate in the simulation, while disabled bodies are turned off and do not get updated during a simulation step. New bodies are always created in the enabled state.

A disabled body that is connected through a joint to an enabled body will be automatically re-enabled at the next simulation step.

Disabled bodies do not consume CPU time, therefore to speed up the simulation bodies should be disabled when they come to rest. This can be done automatically with the auto-disable feature.

If a body has its auto-disable flag turned on, it will automatically disable itself when

A body is considered to be idle when the magnitudes of both its linear average velocity and angular average velocity are below given thresholds. The sample size for the average defaults to one and can be disabled by setting to zero with

Thus, every body has six auto-disable parameters: an enabled flag, a idle step count, an idle time, linear/angular average velocity thresholds, and the average samples count.

Newly created bodies get these parameters from world.

Function Documentation

dReal dBodyGetAutoDisableAngularThreshold ( dBodyID  )

Get auto disable angular average threshold.

Returns
the threshold
int dBodyGetAutoDisableAverageSamplesCount ( dBodyID  )

Get auto disable average size (samples count).

Returns
the nr of steps/size.
int dBodyGetAutoDisableFlag ( dBodyID  )

Get auto disable flag.

Returns
0 or 1
dReal dBodyGetAutoDisableLinearThreshold ( dBodyID  )

Get auto disable linear average threshold.

Returns
the threshold
int dBodyGetAutoDisableSteps ( dBodyID  )

Get auto steps a body must be thought of as idle to disable.

Returns
the nr of steps
dReal dBodyGetAutoDisableTime ( dBodyID  )

Get auto disable time.

Returns
nr of seconds
void dBodySetAutoDisableAngularThreshold ( dBodyID  ,
dReal  angular_average_threshold 
)

Set auto disable angular average threshold.

Returns
the threshold
void dBodySetAutoDisableAverageSamplesCount ( dBodyID  ,
unsigned int  average_samples_count 
)

Set auto disable average buffer size (average steps).

Parameters
average_samples_countthe nr of samples to review.
void dBodySetAutoDisableDefaults ( dBodyID  )

Set auto disable defaults.

Remarks
Set the values for the body to those set as default for the world.
void dBodySetAutoDisableFlag ( dBodyID  ,
int  do_auto_disable 
)

Set auto disable flag.

Parameters
do_auto_disable0 or 1
void dBodySetAutoDisableLinearThreshold ( dBodyID  ,
dReal  linear_average_threshold 
)

Set auto disable linear average threshold.

Returns
the threshold
void dBodySetAutoDisableSteps ( dBodyID  ,
int  steps 
)

Set auto disable steps.

Parameters
stepsthe nr of steps.
void dBodySetAutoDisableTime ( dBodyID  ,
dReal  time 
)

Set auto disable time.

Parameters
timenr of seconds.
dReal dWorldGetAutoDisableAngularAverageThreshold ( dWorldID  )

Get auto disable angular average threshold for newly created bodies.

Returns
the threshold
dReal dWorldGetAutoDisableAngularThreshold ( dWorldID  )

Get auto disable angular threshold for newly created bodies.

Returns
the threshold
int dWorldGetAutoDisableAverageSamplesCount ( dWorldID  )

Get auto disable sample count for newly created bodies.

Returns
number of samples used
int dWorldGetAutoDisableFlag ( dWorldID  )

Get auto disable flag for newly created bodies.

Returns
0 or 1
dReal dWorldGetAutoDisableLinearAverageThreshold ( dWorldID  )

Get auto disable linear average threshold for newly created bodies.

Returns
the threshold
dReal dWorldGetAutoDisableLinearThreshold ( dWorldID  )

Get auto disable linear threshold for newly created bodies.

Returns
the threshold
int dWorldGetAutoDisableSteps ( dWorldID  )

Get auto disable steps for newly created bodies.

Returns
nr of steps
dReal dWorldGetAutoDisableTime ( dWorldID  )

Get auto disable time for newly created bodies.

Returns
nr of seconds
void dWorldSetAutoDisableAngularAverageThreshold ( dWorldID  ,
dReal  angular_average_threshold 
)

Set auto disable angular average threshold for newly created bodies.

Parameters
linear_average_thresholddefault is 0.01
void dWorldSetAutoDisableAngularThreshold ( dWorldID  ,
dReal  angular_threshold 
)

Set auto disable angular threshold for newly created bodies.

Parameters
linear_thresholddefault is 0.01
void dWorldSetAutoDisableAverageSamplesCount ( dWorldID  ,
unsigned int  average_samples_count 
)

Set auto disable average sample count for newly created bodies.

Parameters
average_samples_countDefault is 1, meaning only instantaneous velocity is used. Set to zero to disable sampling and thus prevent any body from auto-disabling.
void dWorldSetAutoDisableFlag ( dWorldID  ,
int  do_auto_disable 
)

Set auto disable flag for newly created bodies.

Parameters
do_auto_disabledefault is false.
void dWorldSetAutoDisableLinearAverageThreshold ( dWorldID  ,
dReal  linear_average_threshold 
)

Set auto disable linear average threshold for newly created bodies.

Parameters
linear_average_thresholddefault is 0.01
void dWorldSetAutoDisableLinearThreshold ( dWorldID  ,
dReal  linear_threshold 
)

Set auto disable linear threshold for newly created bodies.

Parameters
linear_thresholddefault is 0.01
void dWorldSetAutoDisableSteps ( dWorldID  ,
int  steps 
)

Set auto disable steps for newly created bodies.

Parameters
stepsdefault is 10
void dWorldSetAutoDisableTime ( dWorldID  ,
dReal  time 
)

Set auto disable time for newly created bodies.

Parameters
timedefault is 0 seconds