def __init__(self):
      pyvrui.Application.__init__(self, sys.argv)
      pyvrui.GLObject.__init__(self)

      self.showSurface = True
      self.surfaceTransparent = True
      self.showGrid = True
      self.rotateEarth = True

      self.showInnerCore = True
      self.innerCoreTransparent = True

      self.showOuterCore = True
      self.outerCoreTransparent = True

      self.surfaceMaterial = ([1.0, 1.0, 1.0, 0.333], [0.333, 0.333, 0.333], 10.0)
      self.outerCoreMaterial = ([1.0, 0.5, 0.0, 0.333], [1.0, 1.0, 1.0], 50.0)
      self.innerCoreMaterial = ([1.0, 0.0, 0.0, 0.333], [1.0, 1.0, 1.0], 50.0)

      self.mainMenu = self.createMainMenu()
      pyvrui.setMainMenu(self.mainMenu)

      self.renderDialog = self.createRenderDialog()

      self.lastFrameTime = 0.0
      self.rotationAngle = 0.0
      self.rotationSpeed = 5.0

      self.centerDisplayCallback(None)
Beispiel #2
0
   def __init__(self):
      pyvrui.Application.__init__(self, sys.argv)
      pyvrui.GLObject.__init__(self)

      self.modelAngles    = [0.0,   0.0,  0.0]
      self.rotationSpeeds = [9.0, -31.0, 19.0]

      self.rotating = True

      mainMenu = self.createMainMenu()
      pyvrui.setMainMenu(mainMenu)
Beispiel #3
0
   def __init__(self, init, gl_init, draw, frame, button_press, button_release, motion, args):
      pyvrui.Application.__init__(self, sys.argv+args)
      pyvrui.GLObject.__init__(self)

      self._init = init
      self._gl_init = gl_init
      self._display = draw
      self._frame = frame
      self._button_press = button_press
      self._button_release = button_release
      self._motion = motion

      self.menu_callbacks = {} 

      if self._init:
         self._init()

      mainMenu = self.createMainMenu()
      pyvrui.setMainMenu(mainMenu)

      toolManager = pyvrui.getToolManager()
      toolManager.getToolCreationCallbacks().add(self.toolCreationCallback)
      toolManager.getToolDestructionCallbacks().add(self.toolDestructionCallback)
Beispiel #4
0
   def __init__(self, init, gl_init, display, frame, 
                button_press, button_release, motion, 
                communicate,
                args, program_args):
      pyvrui.Application.__init__(self, sys.argv+args)
      pyvrui.GLObject.__init__(self)

      self._init = init
      self._gl_init = gl_init
      self._display = display
      self._frame = frame
      self._button_press = button_press
      self._button_release = button_release
      self._motion = motion
      self._communicate = communicate

      self.menu_callbacks = {} 

      if self._init:
         if program_args:
            debug(msg='initializing with program args', level=WARNING).flush()
            self._init(program_args)
         else:
            debug(msg='initializing without args', level=WARNING).flush()
            self._init()

      mainMenu = self.createMainMenu()
      pyvrui.setMainMenu(mainMenu)

      toolManager = pyvrui.getToolManager()
      toolManager.getToolCreationCallbacks().add(self.toolCreationCallback)
      toolManager.getToolDestructionCallbacks().add(self.toolDestructionCallback)

      #self.locatorTool = None
      self.locatorTools = []

      self.frame_count = 0