The KeyTapGesture class represents a tapping gesture by a finger or tool.
More...
Inherits Gesture.
The KeyTapGesture class represents a tapping gesture by a finger or tool.
- Deprecated:
- 3.0
The possible gesture states.
- Deprecated:
- 3.0
Enumerator |
---|
STATE_INVALID |
An invalid state.
- Deprecated:
- 3.0
|
STATE_START |
The gesture is starting.
Just enough has happened to recognize it. - Deprecated:
- 3.0
|
STATE_UPDATE |
The gesture is in progress.
(Note: not all gestures have updates). - Deprecated:
- 3.0
|
STATE_STOP |
The gesture has completed or stopped.
- Deprecated:
- 3.0
|
The supported types of gestures.
- Deprecated:
- 3.0
Enumerator |
---|
TYPE_INVALID |
An invalid type.
- Deprecated:
- 3.0
|
TYPE_SWIPE |
A straight line movement by the hand with fingers extended.
- Deprecated:
- 3.0
|
TYPE_CIRCLE |
A circular movement by a finger.
- Deprecated:
- 3.0
|
TYPE_SCREEN_TAP |
A forward tapping movement by a finger.
- Deprecated:
- 3.0
|
TYPE_KEY_TAP |
A downward tapping movement by a finger.
- Deprecated:
- 3.0
|
static Type classType |
( |
| ) |
|
|
inlinestatic |
The key tap gesture type.
- Returns
- Type The type value designating a key tap gesture.
- Deprecated:
- 3.0
The direction of finger tip motion.
- Returns
- Vector A unit direction vector if the finger tip is moving; otherwise, a zero-vector.
- Deprecated:
- 3.0
int64_t duration |
( |
| ) |
const |
|
inherited |
The elapsed duration of the recognized movement up to the frame containing this Gesture object, in microseconds.
float microseconds = gesture.duration();
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.
- Returns
- int64_t the elapsed duration in microseconds.
- Deprecated:
- 3.0
float durationSeconds |
( |
| ) |
const |
|
inherited |
The elapsed duration in seconds.
float seconds = gesture.durationSeconds();
- See also
- duration()
- Returns
- float the elapsed duration in seconds.
- Deprecated:
- 3.0
The list of hands associated with this Gesture, if any.
If no hands are related to this gesture, the list is empty.
- Returns
- HandList the list of related Hand objects.
- Deprecated:
- 3.0
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.
int32_t gestureOfInterest = gesture.id();
{
if ((*gl).id() == gestureOfInterest) {
}
}
- Returns
- int32_t the ID of this Gesture.
- Deprecated:
- 3.0
Reports whether this Gesture instance represents a valid Gesture.
if (gesture.isValid()) {
}
- Returns
- bool True, if this is a valid Gesture instance; false, otherwise.
- Deprecated:
- 3.0
bool operator!= |
( |
const Gesture & |
rhs | ) |
const |
|
inherited |
Compare Gesture object inequality.
thisGesture != thatGesture;
Two Gestures are equal only if they represent the same snapshot of the same recognized movement.
- Deprecated:
- 3.0
bool operator== |
( |
const Gesture & |
rhs | ) |
const |
|
inherited |
Compare Gesture object equality.
thisGesture == thatGesture;
Two Gestures are equal if they represent the same snapshot of the same recognized movement.
- Deprecated:
- 3.0
The position where the key tap is registered.
- Returns
- Vector A Vector containing the coordinates of tap location.
- Deprecated:
- 3.0
The progress value is always 1.0 for a key tap gesture.
- Returns
- float The value 1.0.
- Deprecated:
- 3.0
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.
{
switch ((*gl).state()) {
break;
break;
break;
default:
break;
}
}
- Returns
- Gesture::State A value from the Gesture::State enumeration.
- Deprecated:
- 3.0
std::string toString |
( |
| ) |
const |
|
inlineinherited |
A string containing a brief, human-readable description of this Gesture.
std::cout << (*gl).toString() << std::endl;
- Deprecated:
- 3.0