def __init__(self, dataSec, defaultOffset=None, binoculars=None): CallbackDelayer.__init__(self) self.__impulseOscillator = None self.__movementOscillator = None self.__noiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__accelerationSmoother = None self.__readCfg(dataSec) if binoculars is None: return else: self.__cam = BigWorld.FreeCamera() self.__zoom = self.__cfg['zoom'] self.__curSense = 0 self.__curScrollSense = 0 self.__waitVehicleCallbackId = None self.__onChangeControlMode = None self.__aimingSystem = None self.__binoculars = binoculars self.__defaultAimOffset = defaultOffset or Vector2() self.__crosshairMatrix = createCrosshairMatrix( offsetFromNearPlane=self.__dynamicCfg['aimMarkerDistance']) self.__prevTime = BigWorld.time() self.__autoUpdateDxDyDz = Vector3(0, 0, 0) if BattleReplay.g_replayCtrl.isPlaying: BattleReplay.g_replayCtrl.setDataCallback( 'applyZoom', self.__applySerializedZoom) return
def __init__(self, dataSec): super(ArtyCamera, self).__init__() CallbackDelayer.__init__(self) self.isAimOffsetEnabled = True self.__positionOscillator = None self.__positionNoiseOscillator = None self.__switchers = CameraSwitcherCollection(cameraSwitchers=[ CameraSwitcher(switchType=SwitchTypes.FROM_TRANSITION_DIST_AS_MAX, switchToName=CTRL_MODE_NAME.STRATEGIC, switchToPos=0.0) ], isEnabled=True) self.__dynamicCfg = CameraDynamicConfig() self._readConfigs(dataSec) self.__cam = BigWorld.CursorCamera() self.__curSense = self._cfg['sensitivity'] self.__onChangeControlMode = None self.__camDist = 0.0 self.__desiredCamDist = 0.0 self.__aimingSystem = None self.__prevTime = 0.0 self.__prevAimPoint = Vector3() self.__dxdydz = Vector3(0.0, 0.0, 0.0) self.__autoUpdatePosition = False self.__needReset = 0 self.__sourceMatrix = None self.__targetMatrix = None self.__rotation = 0.0 self.__positionHysteresis = None self.__timeHysteresis = None self.__transitionEnabled = True self.__scrollSmoother = SPGScrollSmoother(0.3) self.__collisionDist = 0.0 self.__camViewPoint = Vector3() return
def __init__(self, dataSec, defaultOffset=None): CallbackDelayer.__init__(self) TimeDeltaMeter.__init__(self) self.__shiftKeySensor = None self.__movementOscillator = None self.__impulseOscillator = None self.__noiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__accelerationSmoother = None self.__readCfg(dataSec) self.__onChangeControlMode = None self.__aimingSystem = None self.__curSense = 0 self.__curScrollSense = 0 self.__postmortemMode = False self.__vehiclesToCollideWith = set() self.__focalPointDist = 1.0 self.__autoUpdateDxDyDz = Vector3(0.0) self.__updatedByKeyboard = False if defaultOffset is not None: self.__defaultAimOffset = defaultOffset self.__cam = BigWorld.HomingCamera() self.__cam.aimPointClipCoords = defaultOffset else: self.__defaultAimOffset = Vector2() self.__cam = None return
def __init__(self, dataSec, aim): CallbackDelayer.__init__(self) TimeDeltaMeter.__init__(self) self.__shiftKeySensor = None self.__movementOscillator = None self.__impulseOscillator = None self.__noiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__accelerationSmoother = None self.__readCfg(dataSec) if aim is None: return self.__aim = weakref.proxy(aim) self.__cam = BigWorld.HomingCamera() aimOffset = self.__aim.offset() self.__cam.aimPointClipCoords = Vector2(aimOffset) self.__curSense = 0 self.__curScrollSense = 0 self.__defaultAimOffset = (aimOffset[0], aimOffset[1]) self.__postmortemMode = False self.__modelsToCollideWith = [] self.__onChangeControlMode = None self.__aimingSystem = None self.__focalPointDist = 1.0 self.__autoUpdateDxDyDz = Vector3(0.0)
def __init__(self, dataSec, aim, binoculars): CallbackDelayer.__init__(self) self.__impulseOscillator = None self.__movementOscillator = None self.__noiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__accelerationSmoother = None self.__readCfg(dataSec) if aim is None or binoculars is None: return self.__cam = BigWorld.FreeCamera() self.__zoom = self.__cfg['zoom'] self.__curSense = 0 self.__curScrollSense = 0 self.__waitVehicleCallbackId = None self.__onChangeControlMode = None self.__aimingSystem = SniperAimingSystem(dataSec) self.__aim = weakref.proxy(aim) self.__binoculars = binoculars self.__defaultAimOffset = self.__aim.offset() self.__defaultAimOffset = (self.__defaultAimOffset[0], self.__defaultAimOffset[1]) self.__crosshairMatrix = createCrosshairMatrix( offsetFromNearPlane=self.__dynamicCfg['aimMarkerDistance']) self.__prevTime = BigWorld.time() self.__autoUpdateDxDyDz = Vector3(0, 0, 0)
def __init__(self, dataSec): super(StrategicCamera, self).__init__() CallbackDelayer.__init__(self) self.__positionOscillator = None self.__positionNoiseOscillator = None self.__activeDistRangeSettings = None self.__dynamicCfg = CameraDynamicConfig() self.__cameraYaw = 0.0 self.__switchers = CameraSwitcherCollection(cameraSwitchers=[CameraSwitcher(switchType=SwitchTypes.FROM_TRANSITION_DIST_AS_MIN, switchToName=CTRL_MODE_NAME.ARTY, switchToPos=1.0)], isEnabled=True) self._readConfigs(dataSec) self.__cam = BigWorld.CursorCamera() self.__cam.isHangar = False self.__curSense = self._cfg['sensitivity'] self.__onChangeControlMode = None self.__aimingSystem = None self.__prevTime = BigWorld.time() self.__autoUpdatePosition = False self.__dxdydz = Vector3(0, 0, 0) self.__needReset = 0 self.__smoothingPivotDelta = 0 self.__transitionEnabled = True self.__camDist = 0.0 self.__scrollSmoother = SPGScrollSmoother(0.3) self.__saveDist = False return
def __init__(self, dataSec): CallbackDelayer.__init__(self) self.__positionOscillator = None self.__positionNoiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__readCfg(dataSec) self.__cam = BigWorld.CursorCamera() self.__curSense = self.__cfg['sensitivity'] self.__onChangeControlMode = None self.__aimingSystem = None self.__prevTime = BigWorld.time() self.__autoUpdatePosition = False self.__dxdydz = Vector3(0, 0, 0) self.__needReset = 0 self.__smoothingPivotDelta = 0 return
def __init__(self, dataSec, aim): CallbackDelayer.__init__(self) self.__positionOscillator = None self.__positionNoiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__readCfg(dataSec) self.__cam = BigWorld.CursorCamera() self.__curSense = self.__cfg['sensitivity'] self.__onChangeControlMode = None self.__aimingSystem = StrategicAimingSystem( self.__cfg['distRange'][0], StrategicCamera._CAMERA_YAW) self.__prevTime = BigWorld.time() self.__aimOffsetFunc = None if aim is None: self.__aimOffsetFunc = lambda x=None: (0, 0) else: self.__aimOffsetFunc = aim.offset self.__autoUpdatePosition = False self.__dxdydz = Vector3(0, 0, 0) self.__needReset = 0
def __init__(self, dataSec): CallbackDelayer.__init__(self) self.__positionOscillator = None self.__positionNoiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__readCfg(dataSec) self.__cam = BigWorld.CursorCamera() self.__curSense = self.__cfg['sensitivity'] self.__onChangeControlMode = None self.__camDist = 0.0 self.__desiredCamDist = 0.0 self.__aimingSystem = None self.__prevTime = 0.0 self.__dxdydz = Vector3(0.0, 0.0, 0.0) self.__autoUpdatePosition = False self.__needReset = 0 self.__sourceMatrix = None self.__targetMatrix = None self.__rotation = 0.0 self.__positionHysteresis = None self.__timeHysteresis = None return
def __init__(self, dataSec, defaultOffset=None): super(ArcadeCamera, self).__init__() CallbackDelayer.__init__(self) TimeDeltaMeter.__init__(self) self.__shiftKeySensor = None self.__movementOscillator = None self.__impulseOscillator = None self.__noiseOscillator = None self.__dynamicCfg = CameraDynamicConfig() self.__accelerationSmoother = None self.__readCfg(dataSec) self.__onChangeControlMode = None self.__aimingSystem = None self.__curSense = 0 self.__curScrollSense = 0 self.__postmortemMode = False self.__focalPointDist = 1.0 self.__autoUpdateDxDyDz = Vector3(0.0) self.__updatedByKeyboard = False self.__isCamInTransition = False if defaultOffset is not None: self.__defaultAimOffset = defaultOffset self.__cam = BigWorld.HomingCamera(self.__adCfg['enable']) if self.__adCfg['enable']: self.__cam.initAdvancedCollider( self.__adCfg['fovRatio'], self.__adCfg['rollbackSpeed'], self.__adCfg['minimalCameraDistance'], self.__adCfg['speedThreshold'], self.__adCfg['minimalVolume']) for group_name in VOLUME_GROUPS_NAMES: self.__cam.addVolumeGroup( self.__adCfg['volumeGroups'][group_name]) self.__cam.aimPointClipCoords = defaultOffset else: self.__defaultAimOffset = Vector2() self.__cam = None self.__cameraTransition = BigWorld.TransitionCamera() return