Exemple #1
0
 def __addComponents(self):
     self.disableCourseComponents()
     sectorDist = BigWorld.CameraComponentGround()
     sectorDist.minPositionSettings.planeDistance = 0.0
     sectorDist.maxPositionSettings.planeDistance = 0.0
     sectorDist.interpolationFunc = SplineEasing([Math.Vector2(0, 0), Math.Vector2(1, 1)])
     sectorDist.minArgumentValue = 0
     sectorDist.maxArgumentValue = 1
     sectorDist.duration = 0.01
     sectorHeight = BigWorld.CameraComponentGround()
     sectorHeight.minPositionSettings.planeDistance = 0.0
     sectorHeight.maxPositionSettings.planeDistance = 0.0
     sectorHeight.interpolationFunc = SplineEasing([Math.Vector2(0, 0), Math.Vector2(1, 1)])
     sectorHeight.minArgumentValue = 0
     sectorHeight.maxArgumentValue = 1
     sectorHeight.duration = 0.01
     self._components['gunnerSectorDist'] = sectorDist
     self._components['gunnerSectorHeight'] = sectorHeight
Exemple #2
0
 def __init__(self, cameraPosition, cameraTarget, sourceMatrix, cursor):
     self.defaultFov = 0.0
     self.fovMultiplier = 1.0
     self.__needUpdate = 1
     self.__behaviorHorizon = 1
     self.__isInDebugMode = False
     self._planeMtxProvider = Math.MatrixProduct()
     self._planeMtxProvider.a = sourceMatrix
     self._planeMtxProvider.b = Math.Matrix()
     self._planeMtxProvider.b.setIdentity()
     self._cursorProvider = Math.MatrixProduct()
     self._cursorProvider.b = Math.Matrix()
     self._cursorProvider.b.setIdentity()
     self._cursor = cursor
     self._cursor.sourceMatrix = self._planeMtxProvider
     self._cursorProvider.a = self._cursor.matrix
     fov = BigWorld.CameraComponentGround()
     fov.minPositionSettings.planeDistance = 0.0
     fov.maxPositionSettings.planeDistance = 0.0
     fov.minFovMultiplier = 1.0
     fov.maxFovMultiplier = 1.0
     fov.interpolationFunc = SplineEasing([Math.Vector2(0, 0), Math.Vector2(1, 1)])
     fov.minArgumentValue = 0
     fov.maxArgumentValue = 1
     fov.duration = 0.01
     speed = BigWorld.CameraComponentGround()
     speed.maxPositionSettings.rotationAngle = math.radians(0.0)
     speed.maxPositionSettings.horizontalOffset = 1.0
     speed.maxPositionSettings.verticalOffset = 1.0
     speed.maxPositionSettings.planeDistance = -2
     speed.minPositionSettings.rotationAngle = math.radians(0.0)
     speed.minPositionSettings.horizontalOffset = 1.0
     speed.minPositionSettings.verticalOffset = 1.0
     speed.minPositionSettings.planeDistance = 0.0
     speed.maxFovMultiplier = 1.0
     speed.minFovMultiplier = 1.0
     speed.interpolationFunc = BigWorld.EaseInOutSinusoidal
     speed.minArgumentValue = 200
     speed.maxArgumentValue = 750
     speed.duration = 0.01
     ground = BigWorld.CameraComponentGround()
     ground.maxArgumentValue = 100.0
     ground.minArgumentValue = 1.0
     ground.maxPositionSettings.verticalOffset = 1.0
     ground.minPositionSettings.verticalOffset = 0.7
     ground.interpolationFunc = BigWorld.EaseInOutSinusoidal
     ground.duration = 10.0
     forsage = BigWorld.CameraComponentForsage()
     forsage.positionSettings.rotationAngle = math.radians(0.0)
     forsage.positionSettings.horizontalOffset = 1.0
     forsage.positionSettings.verticalOffset = 1.0
     forsage.maxFovMultiplier = 1.1
     forsage.durationIn = 1.5
     forsage.interpolationFuncIn = SplineEasing('0.0, 0.0, 1.0, 1.0')
     forsage.durationOut = 5.0
     forsage.interpolationFuncOut = SplineEasing('0.0, 0.0, 1.0, 1.0')
     forsage.shakeDuration = 1.0
     forsage.shakeAmplitude = math.radians(0.0)
     forsage.shakeMultiplier = 4.0
     forsage.maxArgumentValue = 1.0
     forsage.minArgumentValue = 0.0
     forsage.planeMatrix = self._planeMtxProvider
     forsage.cursorMatrix = self._cursorProvider
     brake = BigWorld.CameraComponentForsage()
     brake.positionSettings.rotationAngle = math.radians(0.0)
     brake.positionSettings.horizontalOffset = 1.0
     brake.positionSettings.verticalOffset = 1.0
     brake.maxFovMultiplier = 0.9
     brake.durationIn = 5.0
     brake.interpolationFuncIn = SplineEasing('0.0, 0.0, 1.0, 1.0')
     brake.durationOut = 5.0
     brake.interpolationFuncOut = SplineEasing('0.0, 0.0, 1.0, 1.0')
     brake.shakeDuration = 1.0
     brake.shakeAmplitude = math.radians(0.0)
     brake.shakeMultiplier = 4.0
     brake.maxArgumentValue = -1.0
     brake.minArgumentValue = 0.0
     brake.planeMatrix = self._planeMtxProvider
     brake.cursorMatrix = self._cursorProvider
     overlook = BigWorld.CameraComponentOverlook()
     overlook.maxFovMultiplier = 1.0
     overlook.duration = 0.005
     overlook.interpolationFunc = BigWorld.EaseInOutExponential
     overviewMode = BigWorld.CameraComponentForsage()
     overviewMode.maxFovMultiplier = 1.0
     overviewMode.positionSettings.planeDistance = -2
     overviewMode.durationIn = 0.4
     overviewMode.interpolationFuncIn = BigWorld.EaseInOutCubic
     overviewMode.durationOut = 0.4
     overviewMode.interpolationFuncOut = BigWorld.EaseInOutCubic
     overviewMode.maxArgumentValue = 1.0
     overviewMode.minArgumentValue = 0.0
     overviewMode.planeMatrix = Math.Matrix()
     overviewMode.planeMatrix.setIdentity()
     overviewMode.cursorMatrix = Math.Matrix()
     overviewMode.cursorMatrix.setIdentity()
     self.__offsetProvider = Math.Vector4Combiner()
     self.__offsetProvider.a = BigWorld.EllipticalPositionProvider()
     self.__offsetProvider.a.position = cameraPosition
     self.__offsetProvider.b = Math.Vector4(0.0, 0.0, 0.0, 0.0)
     self.__targetProvider = Math.Vector4Combiner()
     self.__targetProvider.a = cameraTarget
     self.__targetProvider.b = Math.Vector4(0.0, 0.0, 0.0, 0.0)
     self._cameraBasis = Math.MatrixProduct()
     self._cameraBasis.b = self._cursorProvider
     self._cameraBasis.a = overlook.effectMatrix
     self._input = BigWorld.CameraInput()
     self._input.accelerationDuration = 0.075
     self._input.decelerationDuration = 0.075
     self._input.planeMatrix = self._planeMtxProvider
     self._input.cursorMatrix = self._cursorProvider
     self._components = {'zoomStateFov': fov,
      'forsage': forsage,
      'brake': brake,
      'speed': speed,
      'ground': ground,
      'overlook': overlook,
      'overviewMode': overviewMode}
     self.__camera = BigWorld.CombatCamera(self.__offsetProvider, self.__targetProvider, Math.Vector4(0.0, 1.0, 0.0, 0.0), self._cameraBasis)