Skip to main content
Version: 14 Oct 2024

MLInputControllerTouchpadGesture

Module: Input

More...

#include <ml_input.h>

Public Attributes

TypeName
MLVec3fpos_and_force
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.
MLInputControllerTouchpadGestureTypetype
MLInputControllerTouchpadGestureDirectiondirection
floatspeed
Speed of gesture. Note that the value has different meanings depending on the gesture type being performed. For radial scroll the distance is the difference in angles between the start and the end of the gesture.
floatdistance
For radial gestures, this is the absolute value of the angle.
floatradius
For radial gestures, this is the radius of the gesture.
floatangle

Detailed Description

struct MLInputControllerTouchpadGesture;

A structure containing information about recognized touchpad gesture.


Public Attributes Documentation

pos_and_force

MLVec3f pos_and_force;

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.


type

MLInputControllerTouchpadGestureType type;

Type of gesture. Supported gesture types are listed below:

  • Tap gesture.
  • Force tap down gesture.
  • Second force down gesture.
  • Force tap up gesture.
  • Force dwell gesture.
  • Radial scroll gesture.
  • Swipe gesture.

direction

MLInputControllerTouchpadGestureDirection direction;

Direction of gesture.


speed

float speed;

Speed of gesture. Note that the value has different meanings depending on the gesture type being performed. For radial scroll the distance is the difference in angles between the start and the end of the gesture.


distance

float distance;

For radial gestures, this is the absolute value of the angle.


radius

float radius;

For radial gestures, this is the radius of the gesture.


angle

float angle;

Angle between the positive x axis and the ray to the finger point in radians.