parameters: (self)
docstring: The render pass for the scene
docstring_summary: The render pass for the scene
docstring_tokens: The render pass for the scene
function: def render(self):
          """ The render pass for the scene """
          self.init_view()
  
          glEnable(GL_LIGHTING)
          glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
  
          # Load the modelview matrix from the current state of the trackball
          glMatrixMode(GL_MODELVIEW)
          glPushMatrix()
          glLoadIdentity()
          loc = self.interaction.translation
          glTranslated(loc[0], loc[1], loc[2])
          glMultMatrixf(self.interaction.trackball.matrix)
  
          # store the inverse of the current modelview.
          currentModelView = numpy.array(glGetFloatv(GL_MODELVIEW_MATRIX))
          self.modelView = numpy.transpose(currentModelView)
          self.inverseModelView = inv(numpy.transpose(currentModelView))
  
          # render the scene. This will call the render function for each object in the scene
          self.scene.render()
  
          # draw the grid
          glDisable(GL_LIGHTING)
          glCallList(G_OBJ_PLANE)
          glPopMatrix()
  
          # flush the buffers so that the scene can be drawn
          glFlush()
function_tokens: def render ( self ) : self . init_view ( ) glEnable ( GL_LIGHTING ) glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) # Load the modelview matrix from the current state of the trackball glMatrixMode ( GL_MODELVIEW ) glPushMatrix ( ) glLoadIdentity ( ) loc = self . interaction . translation glTranslated ( loc [ 0 ] , loc [ 1 ] , loc [ 2 ] ) glMultMatrixf ( self . interaction . trackball . matrix ) # store the inverse of the current modelview. currentModelView = numpy . array ( glGetFloatv ( GL_MODELVIEW_MATRIX ) ) self . modelView = numpy . transpose ( currentModelView ) self . inverseModelView = inv ( numpy . transpose ( currentModelView ) ) # render the scene. This will call the render function for each object in the scene self . scene . render ( ) # draw the grid glDisable ( GL_LIGHTING ) glCallList ( G_OBJ_PLANE ) glPopMatrix ( ) # flush the buffers so that the scene can be drawn glFlush ( )