Ejemplo n.º 1
0
    def __init__(self, *a, **kw):
        self.fov = 70.0  # needed by updateMatrices called from WorldView.__init__
        self._yawPitch = -45., 25.
        self.viewDistance = 32
        
        self.stickyMouselook = False

        self.workplaneNode = WorkplaneNode()
        self.workplaneNode.visible = False

        WorldView.__init__(self, *a, **kw)
        self.compassNode.yawPitch = self._yawPitch

        stickyPanAction = CameraStickyPanMouseAction()
        panAction = CameraPanMouseAction(stickyPanAction)

        self.viewActions = [CameraMoveMouseAction(),
                            panAction, stickyPanAction]

        self.cameraControls = CameraKeyControls(self)
        self.viewActions.extend(self.cameraControls.viewActions)

        self.discardTimer = QtCore.QTimer()
        self.discardTimer.timeout.connect(self.discardChunksOutsideViewDistance)
        self.discardTimer.setInterval(1000)
        self.discardTimer.start()

        self.workplaneLevel = 0
        self.workplaneEnabled = False
        self.viewportMoved.connect(self.updateWorkplane)

        self.forceMouseCenter = False
Ejemplo n.º 2
0
    def __init__(self, *a, **kw):
        self.fov = 70.0  # needed by updateMatrices called from WorldView.__init__
        self._yawPitch = -45., 25.
        self.viewDistance = 32

        self.stickyMouselook = False

        self.workplaneNode = WorkplaneNode()
        self.workplaneNode.visible = False

        WorldView.__init__(self, *a, **kw)
        self.compassNode.yawPitch = self._yawPitch

        stickyPanAction = CameraStickyPanMouseAction()
        panAction = CameraPanMouseAction(stickyPanAction)

        self.viewActions = [
            CameraMoveMouseAction(), panAction, stickyPanAction
        ]

        self.cameraControls = CameraKeyControls(self)
        self.viewActions.extend(self.cameraControls.viewActions)

        self.discardTimer = QtCore.QTimer()
        self.discardTimer.timeout.connect(
            self.discardChunksOutsideViewDistance)
        self.discardTimer.setInterval(1000)
        self.discardTimer.start()

        self.workplaneLevel = 0
        self.workplaneEnabled = False
        self.viewportMoved.connect(self.updateWorkplane)

        self.forceMouseCenter = False
Ejemplo n.º 3
0
 def __init__(self, *a, **kw):
     WorldView.__init__(self, *a, **kw)
     self.setSizePolicy(QtGui.QSizePolicy.Policy.Minimum, QtGui.QSizePolicy.Policy.Minimum)
     self.scale = 1.0
     self.worldScene.minlod = 2
     self.viewCornersNode = ViewCornersNode()
     self.viewCornersNode.dimension = self.dimension
     self.worldNode.addChild(self.viewCornersNode)
Ejemplo n.º 4
0
    def __init__(self, *a, **kw):
        WorldView.__init__(self, *a, **kw)
        self.scale = 1.
        self.compassNode.yawPitch = 180, 0
        self.viewActions.extend((MoveViewMouseAction(), ))
        self.viewActions.extend(ZoomWheelActions())

        self.worldScene.minlod = 2
Ejemplo n.º 5
0
 def __init__(self, *a, **kw):
     WorldView.__init__(self, *a, **kw)
     self.setSizePolicy(QtGui.QSizePolicy.Policy.Minimum, QtGui.QSizePolicy.Policy.Minimum)
     self.scale = 1.0
     self.worldScene.minlod = 2
     self.viewCornersNode = ViewCornersNode()
     self.viewCornersNode.dimension = self.dimension
     self.matrixNode.addChild(self.viewCornersNode)
Ejemplo n.º 6
0
 def __init__(self, *a, **kw):
     WorldView.__init__(self, *a, **kw)
     self.scale = 1.
     self.compassNode.yawPitch = 180, 0
     self.viewActions.extend((
         MoveViewMouseAction(),
         ZoomWheelAction(),
     ))
     self.worldScene.minlod = 2
Ejemplo n.º 7
0
 def __init__(self, *a, **kw):
     axis = kw.pop('axis', 'x')
     WorldView.__init__(self, *a, **kw)
     self.axis = axis
     self.viewportMoved.connect(self.updateMeshPos)
     self.viewActions.extend((
         MoveViewMouseAction(),
         CutawaySliceWheelAction()
     ))
Ejemplo n.º 8
0
 def __init__(self, *a, **kw):
     axis = kw.pop('axis', 'x')
     WorldView.__init__(self, *a, **kw)
     self.axis = axis
     self.viewportMoved.connect(self.updateMeshPos)
     self.viewActions.extend((
         MoveViewMouseAction(),
         CutawaySliceUpAction(),
         CutawaySliceDownAction(),
     ))
Ejemplo n.º 9
0
    def __init__(self, *a, **kw):
        self.fov = 70.0  # needed by updateMatrices called from WorldView.__init__
        self._yawPitch = -45., 25.
        WorldView.__init__(self, *a, **kw)
        self.compassNode.yawPitch = self._yawPitch
        self.viewDistance = 32
        self.viewActions = [CameraMoveMouseAction(), CameraPanMouseAction()]

        self.cameraControls = CameraKeyControls(self)
        self.viewActions.extend(self.cameraControls.viewActions)

        self.discardTimer = QtCore.QTimer()
        self.discardTimer.timeout.connect(
            self.discardChunksOutsideViewDistance)
        self.discardTimer.setInterval(1000)
        self.discardTimer.start()
Ejemplo n.º 10
0
    def __init__(self, *a, **kw):
        self.fov = 70.0  # needed by updateMatrices called from WorldView.__init__
        self._yawPitch = -45., 25.
        self.viewDistance = 32

        WorldView.__init__(self, *a, **kw)
        self.compassNode.yawPitch = self._yawPitch
        self.viewActions = [CameraMoveMouseAction(),
                             CameraPanMouseAction()]

        self.cameraControls = CameraKeyControls(self)
        self.viewActions.extend(self.cameraControls.viewActions)

        self.discardTimer = QtCore.QTimer()
        self.discardTimer.timeout.connect(self.discardChunksOutsideViewDistance)
        self.discardTimer.setInterval(1000)
        self.discardTimer.start()