TouchpadGestureEvent
The event data related to a Magic Leap Touchpad gesture More...
Inherits from:
IEquatable< TouchpadGestureEvent >
Detailed Description
public struct TouchpadGestureEvent : IEquatable< TouchpadGestureEvent >
See: XRGestureSubsystem
Public Fields
angle
Angle from the center of the touchpad to the finger.
public float angle { get; set; }
controllerId
The controller id associated with this gesture.
public byte controllerId { get; set; }
direction
Direction of gesture
public InputSubsystem.Extensions.TouchpadGesture.Direction direction { get; set; }
Type | Description |
---|---|
InputSubsystem.Extensions.TouchpadGesture.Direction | Direction of touchpad gesture. Links to MLInputControllerTouchpadGestureDirection in ml_input.h. |
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].
public float distance { get; set; }
id
The GestureId associated with this gesture.
public GestureId id { get; set; }
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.
public Vector3 positionAndForce { get; set; }
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].
public float radius { get; set; }
speed
Speed of gesture. Note that this takes on different meanings depending on the gesture type being performed:
public float speed { get; set; }
state
The state of the gesture.
public GestureState state { get; set; }
type
Type of gesture.
public InputSubsystem.Extensions.TouchpadGesture.Type type { get; set; }
Type | Description |
---|---|
InputSubsystem.Extensions.TouchpadGesture.Type | Recognized touchpad gesture types. Links to MLInputControllerTouchpadGestureType in ml_input.h. |
Public Methods
override bool Equals
public override bool Equals(
object obj
)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
bool Equals
public bool Equals(
TouchpadGestureEvent other
)
Parameters
Type | Name | Description |
---|---|---|
TouchpadGestureEvent | other | The event data related to a Magic Leap Touchpad gesture |
TouchpadGestureEvent GetDefault
Gets a default-initialized TouchpadGestureEvent.
public static TouchpadGestureEvent GetDefault()
Returns: A default TouchpadGestureEvent.
override int GetHashCode
public override int GetHashCode()
override string ToString
Generates a new string describing the gestures's properties suitable for debugging purposes.
public override string ToString()
Returns: A string describing the gestures's properties.
TouchpadGestureEvent
Constructs a new TouchpadGestureEvent.
public TouchpadGestureEvent(
GestureId id,
GestureState state,
byte controllerId,
float angle,
InputSubsystem.Extensions.TouchpadGesture.Direction direction,
float distance,
Vector3 positionAndForce,
float radius,
float speed,
InputSubsystem.Extensions.TouchpadGesture.Type 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. |
float | angle | The angel of the touch of the gesture. |
InputSubsystem.Extensions.TouchpadGesture.Direction | 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. |
InputSubsystem.Extensions.TouchpadGesture.Type | type | The MLInput.Controller.TouchpadGesture.GestureType type of the gesture. |
bool operator!=
public static bool operator!=(
TouchpadGestureEvent lhs,
TouchpadGestureEvent rhs
)
Parameters
Type | Name | Description |
---|---|---|
TouchpadGestureEvent | lhs | The event data related to a Magic Leap Touchpad gesture |
TouchpadGestureEvent | rhs | The event data related to a Magic Leap Touchpad gesture |
bool operator==
public static bool operator==(
TouchpadGestureEvent lhs,
TouchpadGestureEvent rhs
)
Parameters
Type | Name | Description |
---|---|---|
TouchpadGestureEvent | lhs | The event data related to a Magic Leap Touchpad gesture |
TouchpadGestureEvent | rhs | The event data related to a Magic Leap Touchpad gesture |
Public Attributes
m_Angle
public float m_Angle;
m_ControllerId
public byte m_ControllerId;
m_Direction
public InputSubsystem.Extensions.TouchpadGesture.Direction m_Direction;
Type | Description |
---|---|
InputSubsystem.Extensions.TouchpadGesture.Direction | Direction of touchpad gesture. Links to MLInputControllerTouchpadGestureDirection in ml_input.h. |
m_Distance
public float m_Distance;
m_Id
public GestureId m_Id;
m_PositionAndForce
public Vector3 m_PositionAndForce;
m_Radius
public float m_Radius;
m_Speed
public float m_Speed;
m_State
public GestureState m_State;
m_Type
public InputSubsystem.Extensions.TouchpadGesture.Type m_Type;
Type | Description |
---|---|
InputSubsystem.Extensions.TouchpadGesture.Type | Recognized touchpad gesture types. Links to MLInputControllerTouchpadGestureType in ml_input.h. |