Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes a single contact, such as a finger, on a touch surface of an input device.
Syntax
struct GameInputTouchContact
{
uint64_t contactId;
int32_t screenX;
int32_t screenY;
uint32_t padX;
uint32_t padY;
};
Members
contactId
Type: uint64_t
Identifier of the contact. The identifier stays the same in consecutive readings for as long as the contact remains on the surface, so it can be used to track a contact across readings.
screenX
Type: int32_t
Horizontal position of the contact in screen coordinates. Only meaningful when the surface type is GameInputTouchSurfaceTypeTouchscreen; zero for other surface types.
screenY
Type: int32_t
Vertical position of the contact in screen coordinates. Only meaningful when the surface type is GameInputTouchSurfaceTypeTouchscreen; zero for other surface types.
padX
Type: uint32_t
Horizontal position of the contact on the touch surface, in the range 0 to padWidth - 1 of the surface's GameInputTouchSurfaceInfo.
padY
Type: uint32_t
Vertical position of the contact on the touch surface, in the range 0 to padHeight - 1 of the surface's GameInputTouchSurfaceInfo.
Remarks
This structure is filled by IGameInputReading::GetTouchSurfaceState. Each element describes one contact on the touch surface that's identified by the surfaceIndex parameter of that method.
To get the dimensions and type of the surface, call IGameInputDevice::GetTouchSurfaceInfo with the same surface index. Divide padX and padY by the padWidth and padHeight members of GameInputTouchSurfaceInfo to get positions that are independent of the surface resolution.
Requirements
Header: GameInput.h
Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles
See also
Overview of GameInput
GameInput
GameInputTouchSurfaceInfo
GameInputTouchSurfaceType
IGameInputReading::GetTouchSurfaceState
IGameInputReading::GetTouchContactCount
Version History
| Version | Changes |
|---|---|
| v4 | Introduced. |