GameInputTouchSensorInfo
说明输入设备的触摸传感器。
语法
typedef struct GameInputTouchSensorInfo {
GameInputKind mappedInputKinds;
GameInputLabel label;
GameInputLocation location;
uint32_t locationId;
uint64_t resolutionX;
uint64_t resolutionY;
GameInputTouchShape shape;
float aspectRatio;
float orientation;
float physicalWidth;
float physicalHeight;
float maxPressure;
float maxProximity;
uint32_t maxTouchPoints;
} GameInputTouchSensorInfo
成员
mappedInputKinds
类型:GameInputKind
可供触摸传感器输入的输入设备的类型。 例如,触摸板上的点击可能会映射到方向键上的“按下按钮”。
label
类型:GameInputLabel
触摸传感器的物理标签。
location
类型:GameInputLocation
触摸传感器的位置。
locationId
类型:uint32_t
触摸传感器位置的 ID。
resolutionX
类型:uint64_t
可以沿 x轴生成的唯一值的数量。
resolutionY
类型:uint64_t
可以沿 y轴生成的唯一值的数量。
shape
类型:GameInputTouchShape
触摸传感器的尺寸和形状。
aspectRatio
类型:float
触摸传感器的纵横比。
orientation
类型:float
触摸传感器的方向。
physicalWidth
类型:float
触摸传感器的宽度(以米为单位)。
physicalHeight
类型:float
触摸传感器的高度(以米为单位)。
maxPressure
类型:float
可通过触摸传感器注册的最大压力(单位:牛顿)。 如果该值为零,则触摸传感器不具有压力灵敏度。
maxProximity
类型:float
可以激活触摸传感器的最大距离(单位:米)。 如果该值为零,则仅直接接触会激活触摸传感器。
maxTouchPoints
类型:uint32_t
可通过触摸传感器同时注册的最大触点数。
备注
此结构在 GameInputDeviceInfo 结构中使用。 有关更多信息,请参阅 GetDeviceInfo。
若要从输入设备上的所有触摸传感器检索状态,请使用 IGameInputReading::GetTouchState。
要求
头文件:GameInput.h
支持平台:Windows、Xbox One 系列主机和 Xbox Series 主机