pyCBD.realtime.threadingGameLoopAlt module

class pyCBD.realtime.threadingGameLoopAlt.ThreadingGameLoopAlt[source]

Bases: object

Alternative game loop subsystem for realtime simulation. Time will only progress when a step() call is made.

The difference with the pyCBD.realtime.threadingGameLoop.ThreadingGameLoop class is that this version does not use the internal “time” structure to keep track of executions. It is up to the used to provide the current simulation time.

Warning

Due to its bare-bone nature, it is pertinent to only use this backend if you really know what you’re doing.

step(time)[source]

Perform a step in the simulation. Actual processing is done in a seperate thread. The clock will only update when this function is called, so call it often enough!

Parameters

time (float) – The simulation time at which this step is called.

wait(delay, func)[source]

Wait for the specified time.

Parameters
  • delay (float) – Time to wait.

  • func (callable) – The function to call.