Struct MagicLeapTouchpadGestureEvent | Magic Leap XR Plugin | 6.0.0
docs.unity3d.com
    Show / Hide Table of Contents

    Struct MagicLeapTouchpadGestureEvent

    The event data related to a Magic Leap Touchpad gesture

    Namespace: UnityEngine.XR.MagicLeap
    Syntax
    public struct MagicLeapTouchpadGestureEvent : IEquatable<MagicLeapTouchpadGestureEvent>

    Constructors

    MagicLeapTouchpadGestureEvent(GestureId, GestureState, Byte, Single, MagicLeapTouchpadGestureDirection, Single, Single, Vector3, Single, Single, MagicLeapInputControllerTouchpadGestureType)

    Constructs a new MagicLeapTouchpadGestureEvent.

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

    The GestureId associated with the gesture.

    GestureState state

    The GestureState associated with the gesture.

    Byte controllerId

    The controller id associated with this gesture.

    Single angle

    The angel of the touch of the gesture.

    MagicLeapTouchpadGestureDirection direction

    The direction of the touch of the gesture.

    Single distance

    The distance of the gesture.

    Single fingerGap

    The finger gap the touch of the gesture.

    Vector3 positionAndForce

    The position and force of the gesture.

    Single radius

    The radius of the touch of the gesture.

    Single speed

    The speed of the gesture.

    MagicLeapInputControllerTouchpadGestureType type

    The MagicLeapInputControllerTouchpadGestureType type of the gesture.

    Properties

    angle

    Angle from the center of the touchpad to the finger.

    Declaration
    public float angle { get; }
    Property Value
    Type Description
    Single

    controllerId

    The controller id associated with this gesture.

    Declaration
    public byte controllerId { get; }
    Property Value
    Type Description
    Byte

    direction

    Direction of gesture

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

    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
    Single

    fingerGap

    Distance between the two fingers performing the gestures 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 fingerGap { get; }
    Property Value
    Type Description
    Single

    id

    The GestureId associated with this gesture.

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

    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

    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
    Single

    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
    Single

    state

    The state of the gesture.

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

    type

    Type of gesture.

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

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(MagicLeapTouchpadGestureEvent)

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

    GetDefault()

    Gets a default-initialized MagicLeapTouchpadGestureEvent.

    Declaration
    public static MagicLeapTouchpadGestureEvent GetDefault()
    Returns
    Type Description
    MagicLeapTouchpadGestureEvent

    A default MagicLeapTouchpadGestureEvent.

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    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()

    Operators

    Equality(MagicLeapTouchpadGestureEvent, MagicLeapTouchpadGestureEvent)

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

    Inequality(MagicLeapTouchpadGestureEvent, MagicLeapTouchpadGestureEvent)

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

    See Also

    XRGestureSubsystem
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023