original_docstring:  Render the geometry defined for the graphics scene. 
docstring: Render the geometry defined for the graphics scene.
docstring_tokens: Render the geometry defined for the graphics scene .
code: def render(self):
          """ Render the geometry defined for the graphics scene. """
          # Clear frame buffer and depth buffer
          glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
          #glClearColor(0.40, 0.60, 0.80, 1.0)
          glClearColor(0.75, 0.75, 0.75, 1.0)
  
          # Set transformations.
          glLoadIdentity()
          glPushMatrix ();
          cx = self.center[0]
          cy = self.center[1]
          cz = self.center[2]
          tx = cx + self.xform.translate_x
          ty = cy + self.xform.translate_y
          tz = cz + self.xform.translate_z
          glTranslatef(tx, ty, tz)
          glRotatef(self.xform.rotate_x, 1.0, 0.0, 0.0)
          glRotatef(self.xform.rotate_y, 0.0, 1.0, 0.0)
          glRotatef(self.xform.rotate_z, 0.0, 0.0, 1.0)
          glScalef(self.xform.scale, self.xform.scale, self.xform.scale)
          glTranslatef(-cx, -cy, -cz);
  
          # Render opaque geometry.
          pick_id = 1
          for geom in self.render_geometry.values():
              if not geom.transparent:
                  if self.pick.active:
                      glLoadName(geom.id)
                  geom.render()
                  pick_id += 1
          #__for geom in self.render_geometry.values()
  
          # Render transparent geometry.
          for geom in self.render_geometry.values():
              if geom.transparent:
                  if self.pick.active:
                      glLoadName(geom.id)
                  geom.render()
                  pick_id += 1
          #__for geom in self.render_geometry.values()
  
          glFlush()
  
          # Render picked point.
          self.pick.render()
          glPopMatrix();
  
          if not self.pick.active: 
              glutSwapBuffers()
code_tokens: def render ( self ) : glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) glClearColor ( 0.75 , 0.75 , 0.75 , 1.0 ) glLoadIdentity ( ) glPushMatrix ( ) ; cx = self . center [ 0 ] cy = self . center [ 1 ] cz = self . center [ 2 ] tx = cx + self . xform . translate_x ty = cy + self . xform . translate_y tz = cz + self . xform . translate_z glTranslatef ( tx , ty , tz ) glRotatef ( self . xform . rotate_x , 1.0 , 0.0 , 0.0 ) glRotatef ( self . xform . rotate_y , 0.0 , 1.0 , 0.0 ) glRotatef ( self . xform . rotate_z , 0.0 , 0.0 , 1.0 ) glScalef ( self . xform . scale , self . xform . scale , self . xform . scale ) glTranslatef ( - cx , - cy , - cz ) ; pick_id = 1 for geom in self . render_geometry . values ( ) : if not geom . transparent : if self . pick . active : glLoadName ( geom . id ) geom . render ( ) pick_id += 1 for geom in self . render_geometry . values ( ) : if geom . transparent : if self . pick . active : glLoadName ( geom . id ) geom . render ( ) pick_id += 1 glFlush ( ) self . pick . render ( ) glPopMatrix ( ) ; if not self . pick . active : glutSwapBuffers ( )
short_docstring: Render the geometry defined for the graphics scene.
short_docstring_tokens: Render the geometry defined for the graphics scene .
comment: """ Render the geometry defined for the graphics scene. """$SEP$# Clear frame buffer and depth buffer$SEP$#glClearColor(0.40, 0.60, 0.80, 1.0)$SEP$# Set transformations.$SEP$# Render opaque geometry.$SEP$#__for geom in self.render_geometry.values()$SEP$# Render transparent geometry.$SEP$#__for geom in self.render_geometry.values()$SEP$# Render picked point.