parameters: (self)
docstring: Recalculates the necessary projection.
docstring_summary: Recalculates the necessary projection.
docstring_tokens: Recalculates the necessary projection .
function: def updateProjection(self):
          """
          Recalculates the necessary projection.
          """
          gl.glViewport(0, 0, self.window.width, self.window.height)
  
          gl.glMatrixMode(gl.GL_PROJECTION)
          gl.glLoadIdentity()
  
          ratio = float(self.window.width) / self.window.height
  
          extents = b2Vec2(ratio * 25.0, 25.0)
          extents *= self._viewZoom
  
          lower = self._viewCenter - extents
          upper = self._viewCenter + extents
  
          # L/R/B/T
          gl.gluOrtho2D(lower.x, upper.x, lower.y, upper.y)
  
          gl.glMatrixMode(gl.GL_MODELVIEW)
          gl.glLoadIdentity()
function_tokens: def updateProjection ( self ) : gl . glViewport ( 0 , 0 , self . window . width , self . window . height ) gl . glMatrixMode ( gl . GL_PROJECTION ) gl . glLoadIdentity ( ) ratio = float ( self . window . width ) / self . window . height extents = b2Vec2 ( ratio * 25.0 , 25.0 ) extents *= self . _viewZoom lower = self . _viewCenter - extents upper = self . _viewCenter + extents # L/R/B/T gl . gluOrtho2D ( lower . x , upper . x , lower . y , upper . y ) gl . glMatrixMode ( gl . GL_MODELVIEW ) gl . glLoadIdentity ( )