Esempio n. 1
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)
Esempio n. 2
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