Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    PointerDeviceBase Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll

    Base class for pointer devices

    System.Object → PointerDeviceBase
    Derived from PointerDeviceBase: MouseDeviceBase PointerSimulated

    public abstract class PointerDeviceBase : IPointerDevice, IInputDevice
    Name Description
    Constructors
    PointerDeviceBase()
    Fields
    PointerState
    Properties
    DownPointers
    Id
    Name
    PressedPointers
    Priority
    ReleasedPointers
    Source
    SurfaceAspectRatio
    SurfaceSize
    Methods
    Normalize(Vector2)
    SetSurfaceSize(Vector2)

    Calls SetSurfaceSize(Vector2) and invokes the SurfaceSizeChanged event

    Update(List<InputEvent>)
    Events
    SurfaceSizeChanged
    | Improve this Doc View Source

    Constructors


    PointerDeviceBase()

    protected PointerDeviceBase()
    | Improve this Doc View Source

    Fields


    PointerState

    protected PointerDeviceState PointerState
    Field Value
    Type Description
    PointerDeviceState
    | Improve this Doc View Source

    Properties


    DownPointers

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

    Id

    public abstract Guid Id { get; }
    Property Value
    Type Description
    System.Guid

    Name

    public abstract string Name { get; }
    Property Value
    Type Description
    System.String

    PressedPointers

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

    Priority

    public int Priority { get; set; }
    Property Value
    Type Description
    System.Int32

    ReleasedPointers

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

    Source

    public abstract IInputSource Source { get; }
    Property Value
    Type Description
    IInputSource

    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


    Normalize(Vector2)

    protected Vector2 Normalize(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position
    Returns
    Type Description
    Vector2

    SetSurfaceSize(Vector2)

    Calls SetSurfaceSize(Vector2) and invokes the SurfaceSizeChanged event

    protected void SetSurfaceSize(Vector2 newSize)
    Parameters
    Type Name Description
    Vector2 newSize

    New size of the surface


    Update(List<InputEvent>)

    public virtual void Update(List<InputEvent> inputEvents)
    Parameters
    Type Name Description
    System.Collections.Generic.List<InputEvent> inputEvents
    | Improve this Doc View Source

    Events


    SurfaceSizeChanged

    public event EventHandler<SurfaceSizeChangedEventArgs> SurfaceSizeChanged
    Event Type
    Type Description
    System.EventHandler<SurfaceSizeChangedEventArgs>

    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