parameters: (self,dt=None)
docstring: Advance the simulation and update the GUI
docstring_summary: Advance the simulation and update the GUI
docstring_tokens: Advance the simulation and update the GUI
function: def sim_step(self,dt=None):
          """Advance the simulation and update the GUI"""
          if dt is None:
              dt = self.dt
          if self.sim.getTime() == 0:
              self.sim.simulate(0)
  
          #Handle screenshots
          if self.saveScreenshots:
              #The following line saves movies on simulation time
              if self.sim.getTime() >= self.nextScreenshotTime:
              #The following line saves movies on wall clock time
              #if self.ttotal >= self.nextScreenshotTime:
                  self.save_screen("image%04d.ppm"%(self.screenshotCount,))
              self.screenshotCount += 1
              self.nextScreenshotTime += 1.0/30.0;
  
          if self.htmlSharePath:
              self.htmlSharePath.animate()
  
          self.control_loop()
          self.sim.simulate(dt)
          self.refresh()
function_tokens: def sim_step ( self , dt = None ) : if dt is None : dt = self . dt if self . sim . getTime ( ) == 0 : self . sim . simulate ( 0 ) #Handle screenshots if self . saveScreenshots : #The following line saves movies on simulation time if self . sim . getTime ( ) >= self . nextScreenshotTime : #The following line saves movies on wall clock time #if self.ttotal >= self.nextScreenshotTime: self . save_screen ( "image%04d.ppm" % ( self . screenshotCount , ) ) self . screenshotCount += 1 self . nextScreenshotTime += 1.0 / 30.0 if self . htmlSharePath : self . htmlSharePath . animate ( ) self . control_loop ( ) self . sim . simulate ( dt ) self . refresh ( )