Exemplo n.º 1
0
 def __init__(self, height, yaw):
     IAimingSystem.__init__(self)
     self._matrix = mathUtils.createRotationMatrix((yaw, 0, 0))
     self._planePosition = Vector3(0, 0, 0)
     self.__camDist = 0.0
     self.__height = height
     self.__heightFromPlane = 0.0
 def __init__(self):
     IAimingSystem.__init__(self)
     self.__zoom = None
     self.__idealTurretYaw = 0.0
     self.__idealGunPitch = 0.0
     self.__worldYaw = 0.0
     self.__worldPitch = 0.0
     self._vehicleTypeDescriptor = None
     self._vehicleMProv = None
     self.__siegeState = VEHICLE_SIEGE_STATE.DISABLED
     self.__yprDeviationConstraints = Vector3(
         SniperAimingSystem.__STABILIZED_CONSTRAINTS)
     self.__oscillator = Math.PyOscillator(1.0, Vector3(0.0, 0.0, 15.0),
                                           Vector3(0.0, 0.0, 3.5),
                                           self.__yprDeviationConstraints)
     self.__returningOscillator = Math.PyOscillator(
         1.0, Vector3(0.0, 15.0, 15.0), Vector3(0.0, 3.5, 3.5),
         self.__yprDeviationConstraints)
     self.__pitchCompensating = 0.0
     self.__yawLimits = None
     self.__forceFullStabilization = False
     self.__wasAutoRotationEnabled = False
     self.__timeBeyondLimits = 0.0
     self.__playerGunMatFunction = AimingSystems.getPlayerGunMat
     self.__autoRotationEnabled = False
     return
 def __init__(self,
              vehicleMProv,
              heightAboveTarget,
              focusRadius,
              aimMatrix,
              anglesRange,
              enableSmartShotPointCalc=True):
     IAimingSystem.__init__(self)
     self.__aimMatrix = aimMatrix
     self.__vehicleMProv = vehicleMProv
     self.__anglesRange = anglesRange
     self.__cursor = BigWorld.ThirdPersonProvider()
     self.__cursor.base = vehicleMProv
     self.__cursor.heightAboveBase = heightAboveTarget
     self.__cursor.focusRadius = focusRadius
     self.__idealMatrix = Math.Matrix(self._matrix)
     self.__shotPointCalculator = ShotPointCalculatorPlanar(
     ) if enableSmartShotPointCalc else None
     self.__worldSpaceAimingWithLimits = _WorldSpaceAimingWithLimits(
         self.__vehicleMProv)
     self._vehicleTypeDescriptor = None
     self.__cachedScanDirection = Vector3(0.0, 0.0, 0.0)
     self.__cachedScanStart = Vector3(0.0, 0.0, 0.0)
     self.__cursorShouldCheckCollisions = True
     return
Exemplo n.º 4
0
 def __init__(self, vehicleMProv, heightAboveTarget, focusRadius, aimMatrix, anglesRange, enableSmartShotPointCalc = True):
     IAimingSystem.__init__(self)
     self.__aimMatrix = aimMatrix
     self.__vehicleMProv = vehicleMProv
     self.__anglesRange = anglesRange
     self.__cursor = BigWorld.ThirdPersonProvider()
     self.__cursor.base = vehicleMProv
     self.__cursor.heightAboveBase = heightAboveTarget
     self.__cursor.focusRadius = focusRadius
     self.__shotPointCalculator = ShotPointCalculatorPlanar() if enableSmartShotPointCalc else None
Exemplo n.º 5
0
 def __init__(self):
     IAimingSystem.__init__(self)
     self.__idealTurretYaw = 0.0
     self.__idealGunPitch = 0.0
     self.__worldYaw = 0.0
     self.__worldPitch = 0.0
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__vehiclePrevMat = None
     self.__yprDeviationConstraints = Vector3(math.pi * 2.1, math.pi / 2 * 0.95, 0.0)
     self.__oscillator = Oscillator(1.0, Vector3(0.0, 0.0, 15.0), Vector3(0.0, 0.0, 3.5), self.__yprDeviationConstraints)
Exemplo n.º 6
0
 def __init__(self, vehicleMProv, heightAboveTarget, focusRadius, aimMatrix, anglesRange, enableSmartShotPointCalc = True):
     IAimingSystem.__init__(self)
     self.__aimMatrix = aimMatrix
     self.__vehicleMProv = vehicleMProv
     self.__anglesRange = anglesRange
     self.__cursor = BigWorld.ThirdPersonProvider()
     self.__cursor.base = vehicleMProv
     self.__cursor.heightAboveBase = heightAboveTarget
     self.__cursor.focusRadius = focusRadius
     self.__idealMatrix = self._matrix
     self.__shotPointCalculator = ShotPointCalculatorPlanar() if enableSmartShotPointCalc else None
     return
Exemplo n.º 7
0
 def __init__(self):
     IAimingSystem.__init__(self)
     self.__idealTurretYaw = 0.0
     self.__idealGunPitch = 0.0
     self.__worldYaw = 0.0
     self.__worldPitch = 0.0
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__vehiclePrevMat = None
     self.__yprDeviationConstraints = Vector3(math.pi * 2.1,
                                              math.pi / 2 * 0.95, 0.0)
     self.__oscillator = Oscillator(1.0, Vector3(0.0, 0.0, 15.0),
                                    Vector3(0.0, 0.0, 3.5),
                                    self.__yprDeviationConstraints)
     return
Exemplo n.º 8
0
 def __init__(self, dataSec):
     IAimingSystem.__init__(self)
     self.__idealYaw = 0.0
     self.__idealPitch = 0.0
     self.__g_curPitch = 0.0
     self.__g_curYaw = 0.0
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__vehiclePrevMat = None
     self.__yprDeviationConstraints = Vector3(math.pi * 2.1, math.pi / 2.0 * 0.95, 0.0)
     self.__oscillator = Oscillator(1.0, Vector3(0.0, 0.0, 15.0), Vector3(0.0, 0.0, 3.5), self.__yprDeviationConstraints)
     self.__dInputPitch = 0.0
     self.__dInputYaw = 0.0
     self.__pitchfilter = InputFilter()
     self.reloadConfig(dataSec)
Exemplo n.º 9
0
 def __init__(self, dataSec):
     IAimingSystem.__init__(self)
     self.__idealYaw = 0.0
     self.__idealPitch = 0.0
     self.__g_curPitch = 0.0
     self.__g_curYaw = 0.0
     self.__stailizationLimit = math.radians(60.0)
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__vehiclePrevMat = None
     self.__yprDeviationConstraints = Vector3(math.pi * 2.1, math.pi / 2.0 * 0.95, 0.0)
     self.__oscillator = Math.PyOscillator(1.0, Vector3(0.0, 0.0, 15.0), Vector3(0.0, 0.0, 3.5), self.__yprDeviationConstraints)
     self.__pitchfilter = InputFilter()
     self.reloadConfig(dataSec)
     self.__pitchCompensating = 0.0
     return
Exemplo n.º 10
0
 def __init__(self, dataSec):
     IAimingSystem.__init__(self)
     self.__idealTurretYaw = 0.0
     self.__idealGunPitch = 0.0
     self.__worldYaw = 0.0
     self.__worldPitch = 0.0
     self.__vehicleTypeDescriptor = None
     self.__vehicleMProv = None
     self.__yprDeviationConstraints = Vector3(
         SniperAimingSystem.__STABILIZED_CONSTRAINTS)
     self.__oscillator = Math.PyOscillator(1.0, Vector3(0.0, 0.0, 15.0),
                                           Vector3(0.0, 0.0, 3.5),
                                           self.__yprDeviationConstraints)
     self.__returningOscillator = Math.PyOscillator(
         1.0, Vector3(0.0, 15.0, 15.0), Vector3(0.0, 3.5, 3.5),
         self.__yprDeviationConstraints)
     self.__pitchCompensating = 0.0
     self.__yawLimits = None
     self.__forceFullStabilization = False
     self.__timeBeyondLimits = 0.0
     self.__playerGunMatFunction = AimingSystems.getPlayerGunMat
     return