Exemple #1
0
 def __init__(self):
     ClientSelectableObject.__init__(self)
     CallbackDelayer.__init__(self)
     TimeDeltaMeter.__init__(self)
     self.__state = CameraMovementStates.FROM_OBJECT
     self.__camera = cameras.FreeCamera()
     self.cameraPitch = mathUtils.clamp(-math.pi / 2 * 0.99,
                                        math.pi / 2 * 0.99,
                                        self.cameraPitch)
     self.cameraYaw = normalizeAngle(self.cameraYaw)
     self.__goalPosition = Math.Vector3(0.0, 0.0, 0.0)
     self.__goalDistance = None
     self.__goalTarget = Math.Vector3(0.0, 0.0, 0.0)
     self.__startPosition = Math.Vector3(0.0, 0.0, 0.0)
     self.__startYaw = 0.0
     self.__startPitch = 0.0
     self.__curTime = None
     self.__easedInYaw = 0.0
     self.__easedInPitch = 0.0
     self.__easeInDuration = 0.0
     self.__startFov = None
     self.__goalFov = None
     if self.enableYawLimits:
         self.__yawLimits = Math.Vector2(self.yawLimitMin, self.yawLimitMax)
     else:
         self.__yawLimits = None
     self.__pitchLimits = Math.Vector2(math.degrees(self.pitchLimitMin),
                                       math.degrees(self.pitchLimitMax))
     self.__p1 = Math.Vector3(0.0, 0.0, 0.0)
     self.__p2 = Math.Vector3(0.0, 0.0, 0.0)
     self.__wasPreviousUpdateSkipped = False
     return
Exemple #2
0
 def onLeaveWorld(self):
     if self in ClientSelectableCameraObject.allCameraObjects:
         ClientSelectableCameraObject.allCameraObjects.remove(self)
     self.stopCallback(self.__update)
     if self.__camera == BigWorld.camera():
         BigWorld.worldDrawEnabled(False)
     self.__camera.destroy()
     self.__camera = None
     ClientSelectableObject.onLeaveWorld(self)
     CallbackDelayer.destroy(self)
     return
Exemple #3
0
 def onEnterWorld(self, prereqs):
     ClientSelectableCameraObject.allCameraObjects.add(self)
     ClientSelectableObject.onEnterWorld(self, prereqs)