The Gesture class represents a recognized movement by the user. More...
Inherits Interface.
Inherited by CircleGesture, KeyTapGesture, ScreenTapGesture, and SwipeGesture.
Classes | |
enum | State |
The possible gesture states. More... | |
enum | Type |
The supported types of gestures. More... | |
Public Member Functions | |
long | duration () |
The elapsed duration of the recognized movement up to the frame containing this Gesture object, in microseconds. More... | |
float | durationSeconds () |
The elapsed duration in seconds. More... | |
boolean | equals (Gesture rhs) |
Compare Gesture object equality. More... | |
Frame | frame () |
The Frame containing this Gesture instance. More... | |
Gesture () | |
Constructs a new Gesture object. More... | |
Gesture (Gesture rhs) | |
Constructs a new copy of an Gesture object. More... | |
HandList | hands () |
The list of hands associated with this Gesture, if any. More... | |
int | id () |
The gesture ID. More... | |
boolean | isValid () |
Reports whether this Gesture instance represents a valid Gesture. More... | |
PointableList | pointables () |
The list of fingers and tools associated with this Gesture, if any. More... | |
Gesture.State | state () |
The gesture state. More... | |
String | toString () |
A string containing a brief, human-readable description of this Gesture. More... | |
Gesture.Type | type () |
The gesture type. More... | |
Static Public Member Functions | |
static Gesture | invalid () |
Returns an invalid Gesture object. More... | |
The Gesture class represents a recognized movement by the user.
Gesture | ( | ) |
long duration | ( | ) |
The elapsed duration of the recognized movement up to the frame containing this Gesture object, in microseconds.
The duration reported for the first Gesture in the sequence (with the STATE_START state) will typically be a small positive number since the movement must progress far enough for the Leap Motion software to recognize it as an intentional gesture.
float durationSeconds | ( | ) |
The elapsed duration in seconds.
boolean equals | ( | Gesture | rhs | ) |
Compare Gesture object equality.
Two Gestures are equal if they represent the same snapshot of the same recognized movement.
Frame frame | ( | ) |
HandList hands | ( | ) |
The list of hands associated with this Gesture, if any.
If no hands are related to this gesture, the list is empty.
int id | ( | ) |
The gesture ID.
All Gesture objects belonging to the same recognized movement share the same ID value. Use the ID value with the Frame::gesture() method to find updates related to this Gesture object in subsequent frames.
|
static |
Returns an invalid Gesture object.
boolean isValid | ( | ) |
Reports whether this Gesture instance represents a valid Gesture.
PointableList pointables | ( | ) |
The list of fingers and tools associated with this Gesture, if any.
If no Pointable objects are related to this gesture, the list is empty.
Gesture.State state | ( | ) |
The gesture state.
Recognized movements occur over time and have a beginning, a middle, and an end. The 'state()' attribute reports where in that sequence this Gesture object falls.
String toString | ( | ) |
A string containing a brief, human-readable description of this Gesture.
Gesture.Type type | ( | ) |
The gesture type.