Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    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
    Name Description
    Constructors
    PointerDeviceState(IPointerDevice)
    Fields
    PointerDatas
    PointerInputEvents
    SourceDevice
    Properties
    DownPointers
    InverseSurfaceSize
    PressedPointers
    ReleasedPointers
    SurfaceAspectRatio
    SurfaceSize
    Methods
    GetPointerData(Int32)

    Retrueves a pointer data structure unqiue to the given pointer ID

    ProcessPointerEvent(PointerDeviceState.InputEvent)

    Processes a PointerDeviceState.InputEvent, converting it to a PointerEvent. Also calls and updates

    SetSurfaceSize(Vector2)

    Updates the surface size of the pointing device, updates SurfaceSize, SurfaceAspectRatio, Stride.Input.PointerDeviceState.invSurfaceSize and calls

    Update(List<InputEvent>)

    Generate input events

    UpdatePointerState(PointerEvent, Boolean)

    Updates a pointer event with position / type / id set and updates the storted pointer data

    | Improve this Doc View Source

    Constructors


    PointerDeviceState(IPointerDevice)

    public PointerDeviceState(IPointerDevice pointerDevice)
    Parameters
    Type Name Description
    IPointerDevice pointerDevice
    | Improve this Doc View Source

    Fields


    PointerDatas

    public readonly List<PointerDeviceState.PointerData> PointerDatas
    Field Value
    Type Description
    System.Collections.Generic.List<PointerDeviceState.PointerData>

    PointerInputEvents

    public readonly List<PointerDeviceState.InputEvent> PointerInputEvents
    Field Value
    Type Description
    System.Collections.Generic.List<PointerDeviceState.InputEvent>

    SourceDevice

    public IPointerDevice SourceDevice
    Field Value
    Type Description
    IPointerDevice
    | Improve this Doc View Source

    Properties


    DownPointers

    public IReadOnlySet<PointerPoint> DownPointers { get; }
    Property Value
    Type Description
    IReadOnlySet<PointerPoint>

    InverseSurfaceSize

    public Vector2 InverseSurfaceSize { get; }
    Property Value
    Type Description
    Vector2

    PressedPointers

    public IReadOnlySet<PointerPoint> PressedPointers { get; }
    Property Value
    Type Description
    IReadOnlySet<PointerPoint>

    ReleasedPointers

    public IReadOnlySet<PointerPoint> ReleasedPointers { get; }
    Property Value
    Type Description
    IReadOnlySet<PointerPoint>

    SurfaceAspectRatio

    public float SurfaceAspectRatio { get; }
    Property Value
    Type Description
    System.Single

    SurfaceSize

    public Vector2 SurfaceSize { get; }
    Property Value
    Type Description
    Vector2
    | Improve this Doc View Source

    Methods


    GetPointerData(Int32)

    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
    Type Description
    PointerDeviceState.PointerData

    ProcessPointerEvent(PointerDeviceState.InputEvent)

    Processes a PointerDeviceState.InputEvent, converting it to a PointerEvent. Also calls and updates

    public PointerEvent ProcessPointerEvent(PointerDeviceState.InputEvent evt)
    Parameters
    Type Name Description
    PointerDeviceState.InputEvent evt
    Returns
    Type Description
    PointerEvent

    SetSurfaceSize(Vector2)

    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


    Update(List<InputEvent>)

    Generate input events

    public void Update(List<InputEvent> inputEvents)
    Parameters
    Type Name Description
    System.Collections.Generic.List<InputEvent> inputEvents

    UpdatePointerState(PointerEvent, Boolean)

    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

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation