iDynamics Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iDynamics Struct Reference

This is the interface for the actual plugin. More...

`#include <ivaria/dynamics.h>`

Inheritance diagram for iDynamics:

List of all members.

## Public Member Functions
virtual void | AddStepCallback (iDynamicsStepCallback *callback)=0
| Add a callback to be executed when the dynamic simulation is being stepped.
virtual csPtr< iDynamicSystem > | CreateSystem ()=0
| Create a dynamic system and start its simulation.
virtual iDynamicSystem * | FindSystem (const char *name)=0
| Find a system by name.
virtual void | RemoveStepCallback (iDynamicsStepCallback *callback)=0
| Remove dynamics step callback.
virtual void | RemoveSystem (iDynamicSystem *system)=0
| Remove the dynamic system from the simulation.
virtual void | RemoveSystems ()=0
| Remove all dynamic systems from the simulation.
virtual void | Step (float stepsize)=0
| Step the simulation forward by stepsize milliseconds.

## Detailed Description

This is the interface for the actual plugin.

It is responsible for creating iDynamicSystem.

Main creators of instances implementing this interface:

- ODE Physics plugin (crystalspace.dynamics.ode)

Main ways to get pointers to this interface:

- csQueryRegistry()

Main users of this interface:

- Dynamics loader plugin (crystalspace.dynamics.loader)

See also:
  iODEDynamicState

Definition at line 78 of file dynamics.h.

## Member Function Documentation

virtual void iDynamics::AddStepCallback | ( | iDynamicsStepCallback * | callback | ) | `[pure virtual]`

Add a callback to be executed when the dynamic simulation is being stepped.

virtual csPtr<iDynamicSystem> iDynamics::CreateSystem | ( |  | ) | `[pure virtual]`

Create a dynamic system and start its simulation.

virtual iDynamicSystem* iDynamics::FindSystem | ( | const char * | name | ) | `[pure virtual]`

Find a system by name.

virtual void iDynamics::RemoveStepCallback | ( | iDynamicsStepCallback * | callback | ) | `[pure virtual]`

Remove dynamics step callback.

virtual void iDynamics::RemoveSystem | ( | iDynamicSystem * | system | ) | `[pure virtual]`

Remove the dynamic system from the simulation.

virtual void iDynamics::RemoveSystems | ( |  | ) | `[pure virtual]`

Remove all dynamic systems from the simulation.

virtual void iDynamics::Step | ( | float | stepsize | ) | `[pure virtual]`

Step the simulation forward by stepsize milliseconds.

If the physics engine is ODE, then you must take care of calling the update of the dynamic simulation with a constant step time, otherwise the stability of the simulation might suffer. The Bullet plugin doesn't have the same problem because it uses a constant step time on its own.

The documentation for this struct was generated from the following file:

- ivaria/dynamics.h