예제 #1
0
    def onSize(self, evt):
        """Invoked when the viewport is resized."""
        WxPandaWindow.onSize(self, evt)

        if self.win != None:
            newWidth = self.ClientSize.GetWidth()
            newHeight = self.ClientSize.GetHeight()

            if hasattr(base, "direct") and base.direct:
                for dr in base.direct.drList:
                    if dr.camNode == self.camNode:
                        dr.updateFilmSize(newWidth, newHeight)
                        break
예제 #2
0
  def onSize(self, evt):
    """Invoked when the viewport is resized."""
    WxPandaWindow.onSize(self, evt)
    
    if self.win != None:
      newWidth = self.ClientSize.GetWidth()
      newHeight = self.ClientSize.GetHeight()

      if hasattr(base, "direct") and base.direct:
        for dr in base.direct.drList:
          if dr.camNode == self.camNode:
            dr.updateFilmSize(newWidth, newHeight)
            break
예제 #3
0
    def __init__(self, name, *args, **kwargs):
        self.name = name
        DirectObject.__init__(self)

        kwargs['gsg'] = ViewportManager.gsg
        WxPandaWindow.__init__(self, *args, **kwargs)

        ViewportManager.viewports.append(self)
        if ViewportManager.gsg == None:
            ViewportManager.gsg = self.win.getGsg()

        self.camera = None
        self.lens = None
        self.camPos = None
        self.camLookAt = None
        self.initialized = False
        self.grid = None
        self.collPlane = None
예제 #4
0
  def __init__(self, name, *args, **kwargs):
    self.name = name
    DirectObject.__init__(self)

    kwargs['gsg'] = ViewportManager.gsg
    WxPandaWindow.__init__(self, *args, **kwargs)

    ViewportManager.viewports.append(self)
    if ViewportManager.gsg == None:
      ViewportManager.gsg = self.win.getGsg()

    self.camera = None
    self.lens = None
    self.camPos = None
    self.camLookAt = None
    self.initialized = False
    self.grid = None
    self.collPlane = None