Class PointerDeviceState
Contains logic to generate pointer events and store the resulting state
public class PointerDeviceState- Inheritance
- 
      objectPointerDeviceState
Constructors
PointerDeviceState(IPointerDevice)
public PointerDeviceState(IPointerDevice pointerDevice)Parameters
- pointerDeviceIPointerDevice
Fields
PointerDatas
public readonly List<PointerDeviceState.PointerData> PointerDatasField Value
PointerInputEvents
public readonly List<PointerDeviceState.InputEvent> PointerInputEventsField Value
SourceDevice
public IPointerDevice SourceDeviceField Value
Properties
DownPointers
public IReadOnlySet<PointerPoint> DownPointers { get; }Property Value
InverseSurfaceSize
public Vector2 InverseSurfaceSize { get; }Property Value
PressedPointers
public IReadOnlySet<PointerPoint> PressedPointers { get; }Property Value
ReleasedPointers
public IReadOnlySet<PointerPoint> ReleasedPointers { get; }Property Value
SurfaceAspectRatio
public float SurfaceAspectRatio { get; }Property Value
SurfaceSize
public Vector2 SurfaceSize { get; }Property Value
Methods
GetPointerData(int)
Retrieves a pointer data structure unique to the given pointer ID
public PointerDeviceState.PointerData GetPointerData(int pointerId)Parameters
- pointerIdint
Returns
ProcessPointerEvent(InputEvent)
Processes a PointerDeviceState.InputEvent, converting it to a PointerEvent. Also calls UpdatePointerState(PointerEvent, bool) and updates current PointerEvent
public PointerEvent ProcessPointerEvent(PointerDeviceState.InputEvent evt)Parameters
Returns
SetSurfaceSize(Vector2)
Updates the surface size of the pointing device, updates SurfaceSize, SurfaceAspectRatio, InverseSurfaceSize and calls SurfaceSizeChanged
public void SetSurfaceSize(Vector2 newSize)Parameters
- newSizeVector2
- New size of the surface 
Update(List<InputEvent>)
Generate input events
public void Update(List<InputEvent> inputEvents)Parameters
- inputEventsList<InputEvent>
UpdatePointerState(PointerEvent, bool)
Updates a pointer event with position / type / id set and updates the stored pointer data
public void UpdatePointerState(PointerEvent evt, bool updateDelta = true)Parameters
- evtPointerEvent
- updateDeltabool