parameters: (self, event)
docstring: Zooms the scene (camera).
docstring_summary: Zooms the scene (camera).
docstring_tokens: Zooms the scene ( camera ) .
function: def Zoom(self, event):
          """Zooms the scene (camera).
          """
          if self._CurrentRenderer:
              x = event.GetX()
              y = event.GetY()
  
              renderer = self._CurrentRenderer
              camera = self._CurrentCamera
  
              zoomFactor = math.pow(1.02,(0.5*(self._LastY - y)))
              self._CurrentZoom = self._CurrentZoom * zoomFactor
  
              if camera.GetParallelProjection():
                  parallelScale = camera.GetParallelScale()/zoomFactor
                  camera.SetParallelScale(parallelScale)
              else:
                  camera.Dolly(zoomFactor)
                  renderer.ResetCameraClippingRange()
  
              self._LastX = x
              self._LastY = y
  
              self.Render()
function_tokens: def Zoom ( self , event ) : if self . _CurrentRenderer : x = event . GetX ( ) y = event . GetY ( ) renderer = self . _CurrentRenderer camera = self . _CurrentCamera zoomFactor = math . pow ( 1.02 , ( 0.5 * ( self . _LastY - y ) ) ) self . _CurrentZoom = self . _CurrentZoom * zoomFactor if camera . GetParallelProjection ( ) : parallelScale = camera . GetParallelScale ( ) / zoomFactor camera . SetParallelScale ( parallelScale ) else : camera . Dolly ( zoomFactor ) renderer . ResetCameraClippingRange ( ) self . _LastX = x self . _LastY = y self . Render ( )