PointerDeviceState Class
Namespace: Stride.Input
Assembly: Stride.Input.dll
Contains logic to generate pointer events and store the resulting state
System.Object →
PointerDeviceState
Derived from PointerDeviceState:
public class PointerDeviceState
|
Improve this Doc
View Source
Constructors
public PointerDeviceState(IPointerDevice pointerDevice)
Parameters
|
Improve this Doc
View Source
Fields
public readonly List<PointerDeviceState.PointerData> PointerDatas
Field Value
public readonly List<PointerDeviceState.InputEvent> PointerInputEvents
Field Value
public IPointerDevice SourceDevice
Field Value
|
Improve this Doc
View Source
Properties
public IReadOnlySet<PointerPoint> DownPointers { get; }
Property Value
public Vector2 InverseSurfaceSize { get; }
Property Value
public IReadOnlySet<PointerPoint> PressedPointers { get; }
Property Value
public IReadOnlySet<PointerPoint> ReleasedPointers { get; }
Property Value
public float SurfaceAspectRatio { get; }
Property Value
| Type |
Description |
| System.Single |
|
public Vector2 SurfaceSize { get; }
Property Value
|
Improve this Doc
View Source
Methods
Retrueves a pointer data structure unqiue to the given pointer ID
public PointerDeviceState.PointerData GetPointerData(int pointerId)
Parameters
| Type |
Name |
Description |
| System.Int32 |
pointerId |
|
Returns
public PointerEvent ProcessPointerEvent(PointerDeviceState.InputEvent evt)
Parameters
Returns
Updates the surface size of the pointing device, updates SurfaceSize, SurfaceAspectRatio, Stride.Input.PointerDeviceState.invSurfaceSize and calls
public void SetSurfaceSize(Vector2 newSize)
Parameters
| Type |
Name |
Description |
| Vector2 |
newSize |
New size of the surface
|
public void Update(List<InputEvent> inputEvents)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<InputEvent> |
inputEvents |
|
Updates a pointer event with position / type / id set and updates the storted pointer data
public void UpdatePointerState(PointerEvent evt, bool updateDelta = true)
Parameters
| Type |
Name |
Description |
| PointerEvent |
evt |
|
| System.Boolean |
updateDelta |
|
Extension Methods