当前位置: 首页>>代码示例>>Python>>正文


Python FovExtended.calcHorizontalFov方法代码示例

本文整理汇总了Python中AvatarInputHandler.cameras.FovExtended.calcHorizontalFov方法的典型用法代码示例。如果您正苦于以下问题:Python FovExtended.calcHorizontalFov方法的具体用法?Python FovExtended.calcHorizontalFov怎么用?Python FovExtended.calcHorizontalFov使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AvatarInputHandler.cameras.FovExtended的用法示例。


在下文中一共展示了FovExtended.calcHorizontalFov方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: onEnterWorld

# 需要导入模块: from AvatarInputHandler.cameras import FovExtended [as 别名]
# 或者: from AvatarInputHandler.cameras.FovExtended import calcHorizontalFov [as 别名]
def onEnterWorld(self, prereqs):
    if self.isPlayerVehicle:
        global yaw, old_yaw, pitch, old_pitch, old_multiplier, dataHor, dataVert, turretYawLimits, scaleHor, scaleVert
        global minStep, maxPitch, minPitch, currentStep, minBound, maxBound, screenHeight, screenWidth, player
        global old_gunAnglesPacked, isAlive, cameraMode
        player = BigWorld.player()
        yaw = 0.0
        pitch = 0.0
        old_multiplier = 1.0
        old_gunAnglesPacked = None
        old_yaw = None
        old_pitch = None
        isAlive = self.isAlive
        screenHeight = BigWorld.screenHeight()
        screenWidth = BigWorld.screenWidth()
        currentStep = STEP
        verticalFov = FovExtended.instance().actualDefaultVerticalFov
        horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
        scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
        scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
        gun = self.typeDescriptor.gun
        minBound, maxBound = gun['pitchLimits']['absolute']
        minStep = (maxBound - minBound) / 63
        turretYawLimits = gun['turretYawLimits']
        maxPitch =gun['pitchLimits']['maxPitch']
        minPitch = gun['pitchLimits']['minPitch']
        dataHor, dataVert = coordinate(yaw, pitch)
        cameraMode = None
        as_event('ON_ANGLES_AIMING')
开发者ID:xenus,项目名称:wot,代码行数:31,代码来源:anglesAiming.py

示例2: StrategicAimingSystem_enable

# 需要导入模块: from AvatarInputHandler.cameras import FovExtended [as 别名]
# 或者: from AvatarInputHandler.cameras.FovExtended import calcHorizontalFov [as 别名]
def StrategicAimingSystem_enable(self, targetPos):
    global dataHor, dataVert, scaleHor, scaleVert, yHor, yVert, cameraMode
    verticalFov = FovExtended.instance().actualDefaultVerticalFov
    horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
    yHor = 0
    yVert = 0
    scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
    scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
    dataHor, dataVert = coordinate(yaw, pitch)
    cameraMode = 'str'
    as_event('ON_ANGLES_AIMING')
开发者ID:xenus,项目名称:wot,代码行数:13,代码来源:anglesAiming.py

示例3: ArcadeAimingSystem_enable

# 需要导入模块: from AvatarInputHandler.cameras import FovExtended [as 别名]
# 或者: from AvatarInputHandler.cameras.FovExtended import calcHorizontalFov [as 别名]
def ArcadeAimingSystem_enable(self, targetPos, turretYaw=None, gunPitch=None):
    global dataHor, dataVert, scaleHor, scaleVert, yHor, yVert, cameraMode
    verticalFov = FovExtended.instance().actualDefaultVerticalFov
    horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
    yHor = - screenHeight * 0.0775
    yVert = yHor
    scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
    scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
    dataHor, dataVert = coordinate(yaw, pitch)
    cameraMode = 'arc'
    as_event('ON_ANGLES_AIMING')
开发者ID:xenus,项目名称:wot,代码行数:13,代码来源:anglesAiming.py


注:本文中的AvatarInputHandler.cameras.FovExtended.calcHorizontalFov方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。