Struct MagicLeapTouchpadGestureEvent
The event data related to a Magic Leap Touchpad gesture
Implements
Inherited Members
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
Properties
angle
Angle from the center of the touchpad to the finger.
Declaration
public float angle { get; }
Property Value
| Type | Description |
|---|---|
| float |
See Also
controllerId
The controller id associated with this gesture.
Declaration
public byte controllerId { get; }
Property Value
| Type | Description |
|---|---|
| byte |
See Also
direction
Direction of gesture
Declaration
public MagicLeapTouchpadGestureDirection direction { get; }
Property Value
| Type | Description |
|---|---|
| MagicLeapTouchpadGestureDirection |
See Also
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
id
The UnityEngine.XR.InteractionSubsystems.GestureId associated with this gesture.
Declaration
public GestureId id { get; }
Property Value
| Type | Description |
|---|---|
| GestureId |
See Also
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
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
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
state
The state of the gesture.
Declaration
public GestureState state { get; }
Property Value
| Type | Description |
|---|---|
| GestureState |
See Also
type
Type of gesture.
Declaration
public MagicLeapInputControllerTouchpadGestureType type { get; }
Property Value
| Type | Description |
|---|---|
| MagicLeapInputControllerTouchpadGestureType |
See Also
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 |
|
Overrides
See Also
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
GetDefault()
Gets a default-initialized MagicLeapTouchpadGestureEvent.
Declaration
public static MagicLeapTouchpadGestureEvent GetDefault()
Returns
| Type | Description |
|---|---|
| MagicLeapTouchpadGestureEvent | A default MagicLeapTouchpadGestureEvent. |
See Also
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
See Also
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
See Also
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
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 |