docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MagicLeapTouchpadGestureEvent

    The event data related to a Magic Leap Touchpad gesture

    Implements
    IEquatable<MagicLeapTouchpadGestureEvent>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.MagicLeap
    Assembly: UnityEngine.XR.MagicLeap.dll
    Syntax
    public struct MagicLeapTouchpadGestureEvent : IEquatable<MagicLeapTouchpadGestureEvent>

    Constructors

    MagicLeapTouchpadGestureEvent(GestureId, GestureState, byte, float, MagicLeapTouchpadGestureDirection, float, Vector3, float, float, MagicLeapInputControllerTouchpadGestureType)

    Constructs a new MagicLeapTouchpadGestureEvent.

    Declaration
    public MagicLeapTouchpadGestureEvent(GestureId id, GestureState state, byte controllerId, float angle, MagicLeapTouchpadGestureDirection direction, float distance, Vector3 positionAndForce, float radius, float speed, MagicLeapInputControllerTouchpadGestureType type)
    Parameters
    Type Name Description
    GestureId id

    The UnityEngine.XR.InteractionSubsystems.GestureId associated with the gesture.

    GestureState state

    The UnityEngine.XR.InteractionSubsystems.GestureState associated with the gesture.

    byte controllerId

    The controller id associated with this gesture.

    float angle

    The angel of the touch of the gesture.

    MagicLeapTouchpadGestureDirection direction

    The direction of the touch of the gesture.

    float distance

    The distance of the gesture.

    Vector3 positionAndForce

    The Vector3 position and force of the gesture.

    float radius

    The radius of the touch of the gesture.

    float speed

    The speed of the gesture.

    MagicLeapInputControllerTouchpadGestureType type

    The MagicLeapInputControllerTouchpadGestureType type of the gesture.

    See Also
    XRGestureSubsystem

    Properties

    angle

    Angle from the center of the touchpad to the finger.

    Declaration
    public float angle { get; }
    Property Value
    Type Description
    float
    See Also
    XRGestureSubsystem

    controllerId

    The controller id associated with this gesture.

    Declaration
    public byte controllerId { get; }
    Property Value
    Type Description
    byte
    See Also
    XRGestureSubsystem

    direction

    Direction of gesture

    Declaration
    public MagicLeapTouchpadGestureDirection direction { get; }
    Property Value
    Type Description
    MagicLeapTouchpadGestureDirection
    See Also
    XRGestureSubsystem

    distance

    For radial gestures, this is the absolute value of the angle. For scroll and pinch gestures, this is the absolute distance traveled in touchpad distance. The touchpad is defined as having extents of [-1.0,1.0] so this distance has a range of [0.0,2.0].

    Declaration
    public float distance { get; }
    Property Value
    Type Description
    float
    See Also
    XRGestureSubsystem

    id

    The UnityEngine.XR.InteractionSubsystems.GestureId associated with this gesture.

    Declaration
    public GestureId id { get; }
    Property Value
    Type Description
    GestureId
    See Also
    XRGestureSubsystem

    positionAndForce

    Gesture position (x,y) and force (z). Position is in the [-1.0,1.0] range and force is in the [0.0,1.0] range.

    Declaration
    public Vector3 positionAndForce { get; }
    Property Value
    Type Description
    Vector3
    See Also
    XRGestureSubsystem

    radius

    For radial gestures, this is the radius of the gesture. The touchpad is defined as having extents of [-1.0,1.0] so this radius has a range of [0.0,2.0].

    Declaration
    public float radius { get; }
    Property Value
    Type Description
    float
    See Also
    XRGestureSubsystem

    speed

    Speed of gesture. Note that this takes on different meanings depending on the gesture type being performed:

    Declaration
    public float speed { get; }
    Property Value
    Type Description
    float
    See Also
    XRGestureSubsystem

    state

    The state of the gesture.

    Declaration
    public GestureState state { get; }
    Property Value
    Type Description
    GestureState
    See Also
    XRGestureSubsystem

    type

    Type of gesture.

    Declaration
    public MagicLeapInputControllerTouchpadGestureType type { get; }
    Property Value
    Type Description
    MagicLeapInputControllerTouchpadGestureType
    See Also
    XRGestureSubsystem

    Methods

    Equals(object)

    Equals test

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    Object to compare with

    Returns
    Type Description
    bool

    true if equal

    Overrides
    ValueType.Equals(object)
    See Also
    XRGestureSubsystem

    Equals(MagicLeapTouchpadGestureEvent)

    Equals test

    Declaration
    public bool Equals(MagicLeapTouchpadGestureEvent other)
    Parameters
    Type Name Description
    MagicLeapTouchpadGestureEvent other

    other object to compare with

    Returns
    Type Description
    bool

    true if equal

    See Also
    XRGestureSubsystem

    GetDefault()

    Gets a default-initialized MagicLeapTouchpadGestureEvent.

    Declaration
    public static MagicLeapTouchpadGestureEvent GetDefault()
    Returns
    Type Description
    MagicLeapTouchpadGestureEvent

    A default MagicLeapTouchpadGestureEvent.

    See Also
    XRGestureSubsystem

    GetHashCode()

    Generate a hash code from this object

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Integer representing the hash code of this object.

    Overrides
    ValueType.GetHashCode()
    See Also
    XRGestureSubsystem

    ToString()

    Generates a new string describing the gestures's properties suitable for debugging purposes.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string describing the gestures's properties.

    Overrides
    ValueType.ToString()
    See Also
    XRGestureSubsystem

    Operators

    operator ==(MagicLeapTouchpadGestureEvent, MagicLeapTouchpadGestureEvent)

    Equivalency operator

    Declaration
    public static bool operator ==(MagicLeapTouchpadGestureEvent lhs, MagicLeapTouchpadGestureEvent rhs)
    Parameters
    Type Name Description
    MagicLeapTouchpadGestureEvent lhs

    Left hand side

    MagicLeapTouchpadGestureEvent rhs

    Right hand side

    Returns
    Type Description
    bool

    true if equal

    See Also
    XRGestureSubsystem

    operator !=(MagicLeapTouchpadGestureEvent, MagicLeapTouchpadGestureEvent)

    Inequality operator

    Declaration
    public static bool operator !=(MagicLeapTouchpadGestureEvent lhs, MagicLeapTouchpadGestureEvent rhs)
    Parameters
    Type Name Description
    MagicLeapTouchpadGestureEvent lhs

    Left hand side

    MagicLeapTouchpadGestureEvent rhs

    Right hand side

    Returns
    Type Description
    bool

    true if not equal

    See Also
    XRGestureSubsystem

    Implements

    IEquatable<T>

    See Also

    XRGestureSubsystem
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)