GameInputControllerAxisInfo

说明输入设备上的轴。

语法

typedef struct GameInputControllerAxisInfo {  
    GameInputKind mappedInputKinds;  
    GameInputLabel label;  
    bool isContinuous;  
    bool isNonlinear;  
    bool isQuantized;  
    bool hasRestValue;  
    float restValue;  
    uint64_t resolution;  
    uint16_t legacyDInputIndex;  
    uint16_t legacyHidIndex;  
    uint32_t rawReportIndex;  
    GameInputRawDeviceReportInfo const * inputReport;  
    GameInputRawDeviceReportItemInfo const * inputReportItem;  
} GameInputControllerAxisInfo  

成员

mappedInputKinds
类型:GameInputKind

此轴所产生的输入状态类别(如果有)。

label
类型:GameInputLabel

该轴的物理标签。

isContinuous
类型:bool

表明无论轴是否连续,即轴可以增长到最大值,然后“缠绕”到最小值(并且反之亦然)。 例如一个向各个方向自由旋转不会停止的转盘。

isNonlinear
类型:bool

表明这个轴是非线性的。

isQuantized
类型:bool

表明轴是否用基本数的倍数表示。 用基本数的倍数表示的输入指示设备生成的分辨率更改可以比使用 32 位浮点值时所表示的分辨率更高。 为了获得全精度,请解析原始有效负载数据。

hasRestValue
类型:bool

指示轴是否具有其余值。 具有物理“原始”位置(例如控制杆的中心位置或制动踏板的“释放”位置)轴具有其余值。 不具有原始位置的轴(例如飞行摇杆上的油门)不具有其余值。

restValue
类型:float

轴的其余值(当 hasRestValue 为 true 时)。

分辨率
类型:uint64_t

可由轴表示的唯一值的数目。

legacyDInputIndex
类型:uint16_t

旧版直接输入索引。

legacyHidIndex
类型:uint16_t

Legacy HID index.

rawReportIndex
类型:uint32_t

原始报告的索引。

inputReport
类型:GameInputRawDeviceReportInfo const *

指向原始设备报告的指针。

inputReportItem
类型:GameInputRawDeviceReportItemInfo const *

指向原始设备报告项目的指针。

备注

此结构在 GameInputDeviceInfo 结构中使用。 GameInputDeviceInfoIGameInputDevice::GetDeviceInfo 方法使用。

有关详细信息,请参阅 GameInput 设备

要求

头文件:GameInput.h

支持平台:Windows、Xbox One 系列主机和 Xbox Series 主机

另请参阅

GameInput 概述
GameInput