Module ode :: Class World
[show private | hide private]
[frames | no frames]

Type World

object --+
         |
        World


Dynamics world.

The world object is a container for rigid bodies and joints.

Constructor:
 World()

Method Summary
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
float getAutoDisableAngularThreshold()
Get the default auto-disable angular threshold for newly created bodies.
bool getAutoDisableFlag()
Get the default auto-disable flag for newly created bodies.
float getAutoDisableLinearThreshold()
Get the default auto-disable linear threshold for newly created bodies.
int getAutoDisableSteps()
Get the default auto-disable steps for newly created bodies.
float getAutoDisableTime()
Get the default auto-disable time for newly created bodies.
float getCFM()
Get the global CFM (constraint force mixing) value.
float getContactMaxCorrectingVel()
Get the maximum correcting velocity that contacts are allowed to generate.
  getContactSurfaceLayer()
Get the depth of the surface layer around all geometry objects.
float getERP()
Get the global ERP value, that controls how much error correction is performed in each time step.
3-tuple getGravity()
Return the world's global gravity vector as a 3-tuple of floats.
int getQuickStepNumIterations()
Get the number of iterations that the QuickStep method performs per step.
3-tuple impulseToForce(stepsize, impulse)
If you want to apply a linear or angular impulse to a rigid body, instead of a force or a torque, then you can use this function to convert the desired impulse into a force/torque vector before calling the dBodyAdd...
  quickStep(stepsize)
Step the world.
  setAutoDisableAngularThreshold(threshold)
Set the default auto-disable angular threshold for newly created bodies.
  setAutoDisableFlag(flag)
Set the default auto-disable flag for newly created bodies.
  setAutoDisableLinearThreshold(threshold)
Set the default auto-disable linear threshold for newly created bodies.
  setAutoDisableSteps(steps)
Set the default auto-disable steps for newly created bodies.
  setAutoDisableTime(time)
Set the default auto-disable time for newly created bodies.
  setCFM(cfm)
Set the global CFM (constraint force mixing) value.
  setContactMaxCorrectingVel(vel)
Set the maximum correcting velocity that contacts are allowed to generate.
  setContactSurfaceLayer(depth)
Set the depth of the surface layer around all geometry objects.
  setERP(erp)
Set the global ERP value, that controls how much error correction is performed in each time step.
  setGravity(gravity)
Set the world's global gravity vector.
  setQuickStepNumIterations(num)
Set the number of iterations that the QuickStep method performs per step.
  step(stepsize)
Step the world.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
__builtin__.object.__new__

getAutoDisableAngularThreshold()

Get the default auto-disable angular threshold for newly created bodies.
Returns:
float

getAutoDisableFlag()

Get the default auto-disable flag for newly created bodies.
Returns:
bool

getAutoDisableLinearThreshold()

Get the default auto-disable linear threshold for newly created bodies.
Returns:
float

getAutoDisableSteps()

Get the default auto-disable steps for newly created bodies.
Returns:
int

getAutoDisableTime()

Get the default auto-disable time for newly created bodies.
Returns:
float

getCFM()

Get the global CFM (constraint force mixing) value. Typical values are in the range 10E-9 - 1. The default is 10E-5 if single precision is being used, or 10E-10 if double precision is being used.
Returns:
float

getContactMaxCorrectingVel()

Get the maximum correcting velocity that contacts are allowed to generate. The default value is infinity (i.e. no limit). Reducing this value can help prevent "popping" of deeply embedded objects.
Returns:
float

getContactSurfaceLayer()

Get the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. The default value is zero. Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken.

getERP()

Get the global ERP value, that controls how much error correction is performed in each time step. Typical values are in the range 0.1-0.8. The default is 0.2.
Returns:
float

getGravity()

Return the world's global gravity vector as a 3-tuple of floats.
Returns:
3-tuple

getQuickStepNumIterations()

Get the number of iterations that the QuickStep method performs per step. More iterations will give a more accurate solution, but will take longer to compute. The default is 20 iterations.
Returns:
int

impulseToForce(stepsize, impulse)

If you want to apply a linear or angular impulse to a rigid body, instead of a force or a torque, then you can use this function to convert the desired impulse into a force/torque vector before calling the dBodyAdd... function.
Parameters:
stepsize - Time step
           (type=float)
impulse - Impulse vector
           (type=3-tuple of floats)
Returns:
3-tuple

quickStep(stepsize)

Step the world. This uses an iterative method that takes time on the order of O(m*N) and memory on the order of O(m), where m is the total number of constraint rows and N is the number of iterations.

For large systems this is a lot faster than dWorldStep, but it is less accurate.
Parameters:
stepsize - Time step
           (type=float)

setAutoDisableAngularThreshold(threshold)

Set the default auto-disable angular threshold for newly created bodies.
Parameters:
threshold - Angular threshold
           (type=float)

setAutoDisableFlag(flag)

Set the default auto-disable flag for newly created bodies.
Parameters:
flag - True = Do auto disable
           (type=bool)

setAutoDisableLinearThreshold(threshold)

Set the default auto-disable linear threshold for newly created bodies.
Parameters:
threshold - Linear threshold
           (type=float)

setAutoDisableSteps(steps)

Set the default auto-disable steps for newly created bodies.
Parameters:
steps - Auto disable steps
           (type=int)

setAutoDisableTime(time)

Set the default auto-disable time for newly created bodies.
Parameters:
time - Auto disable time
           (type=float)

setCFM(cfm)

Set the global CFM (constraint force mixing) value. Typical values are in the range 10E-9 - 1. The default is 10E-5 if single precision is being used, or 10E-10 if double precision is being used.
Parameters:
cfm - Constraint force mixing value
           (type=float)

setContactMaxCorrectingVel(vel)

Set the maximum correcting velocity that contacts are allowed to generate. The default value is infinity (i.e. no limit). Reducing this value can help prevent "popping" of deeply embedded objects.
Parameters:
vel - Maximum correcting velocity
           (type=float)

setContactSurfaceLayer(depth)

Set the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. The default value is zero. Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken.
Parameters:
depth - Surface layer depth
           (type=float)

setERP(erp)

Set the global ERP value, that controls how much error correction is performed in each time step. Typical values are in the range 0.1-0.8. The default is 0.2.
Parameters:
erp - Global ERP value
           (type=float)

setGravity(gravity)

Set the world's global gravity vector.
Parameters:
gravity - Gravity vector
           (type=3-sequence of floats)

setQuickStepNumIterations(num)

Set the number of iterations that the QuickStep method performs per step. More iterations will give a more accurate solution, but will take longer to compute. The default is 20 iterations.
Parameters:
num - Number of iterations
           (type=int)

step(stepsize)

Step the world. This uses a "big matrix" method that takes time on the order of O(m3) and memory on the order of O(m2), where m is the total number of constraint rows.

For large systems this will use a lot of memory and can be very slow, but this is currently the most accurate method.
Parameters:
stepsize - Time step
           (type=float)

Generated by Epydoc 2.1 on Sun Feb 4 17:54:12 2007 http://epydoc.sf.net