#include <Leap.h>
Static Public Member Functions | |
static Type | classType () |
Static Public Member Functions inherited from Leap::Gesture | |
static LEAP_EXPORT const Gesture & | invalid () |
Public Attributes | |
this | |
Public Attributes inherited from Leap::Gesture | |
this | |
Static Public Attributes | |
class_type = staticmethod(LeapPython.KeyTapGesture_class_type) | |
direction = _swig_property(LeapPython.KeyTapGesture_direction_get) | |
pointable = _swig_property(LeapPython.KeyTapGesture_pointable_get) | |
position = _swig_property(LeapPython.KeyTapGesture_position_get) | |
progress = _swig_property(LeapPython.KeyTapGesture_progress_get) | |
Static Public Attributes inherited from Leap::Gesture | |
duration = _swig_property(LeapPython.Gesture_duration_get) | |
duration_seconds = _swig_property(LeapPython.Gesture_duration_seconds_get) | |
frame = _swig_property(LeapPython.Gesture_frame_get) | |
hands = _swig_property(LeapPython.Gesture_hands_get) | |
id = _swig_property(LeapPython.Gesture_id_get) | |
is_valid = _swig_property(LeapPython.Gesture_is_valid_get) | |
pointables = _swig_property(LeapPython.Gesture_pointables_get) | |
state = _swig_property(LeapPython.Gesture_state_get) | |
STATE_INVALID = LeapPython.Gesture_STATE_INVALID | |
STATE_START = LeapPython.Gesture_STATE_START | |
STATE_STOP = LeapPython.Gesture_STATE_STOP | |
STATE_UPDATE = LeapPython.Gesture_STATE_UPDATE | |
type = _swig_property(LeapPython.Gesture_type_get) | |
TYPE_CIRCLE = LeapPython.Gesture_TYPE_CIRCLE | |
TYPE_INVALID = LeapPython.Gesture_TYPE_INVALID | |
TYPE_KEY_TAP = LeapPython.Gesture_TYPE_KEY_TAP | |
TYPE_SCREEN_TAP = LeapPython.Gesture_TYPE_SCREEN_TAP | |
TYPE_SWIPE = LeapPython.Gesture_TYPE_SWIPE | |
Static Private Attributes | |
__getattr__ = lambdaself,name:_swig_getattr(self, KeyTapGesture, name) | |
__repr__ = _swig_repr | |
__setattr__ = lambdaself,name,value:_swig_setattr(self, KeyTapGesture, name, value) | |
__swig_destroy__ = LeapPython.delete_KeyTapGesture | |
dictionary | __swig_getmethods__ = {} |
dictionary | __swig_setmethods__ = {} |
Additional Inherited Members | |
Public Types inherited from Leap::Gesture | |
enum | State { STATE_INVALID = -1, STATE_START = 1, STATE_UPDATE = 2, STATE_STOP = 3 } |
enum | Type { TYPE_INVALID = -1, TYPE_SWIPE = 1, TYPE_CIRCLE = 4, TYPE_SCREEN_TAP = 5, TYPE_KEY_TAP = 6 } |
Protected Member Functions inherited from Leap::Interface | |
template<typename T > | |
T * | get () const |
LEAP_EXPORT | Interface (void *owner) |
LEAP_EXPORT | Interface (Implementation *reference, void *owner) |
LEAP_EXPORT | Interface (const Interface &rhs) |
Interface (class SharedObject *object) | |
LEAP_EXPORT Interface & | operator= (const Interface &rhs) |
virtual LEAP_EXPORT | ~Interface () |
Static Protected Member Functions inherited from Leap::Interface | |
static LEAP_EXPORT void | deleteCString (const char *cstr) |
Protected Attributes inherited from Leap::Interface | |
class SharedObject * | m_object |
The KeyTapGesture class represents a tapping gesture by a finger or tool.
A key tap gesture is recognized when the tip of a finger rotates down toward the palm and then springs back to approximately the original position, as if tapping. The tapping finger must pause briefly before beginning the tap.
Important: To use key tap gestures in your application, you must enable recognition of the key tap gesture. You can enable recognition with:
Key tap gestures are discrete. The KeyTapGesture object representing a tap always has the state, STATE_STOP. Only one KeyTapGesture object is created for each key tap gesture recognized.
You can set the minimum finger movement and velocity required for a movement to be recognized as a key tap as well as adjust the detection window for evaluating the movement using the config attribute of a connected Controller object. Use the following configuration keys to configure key tap recognition:
==================================== ========== ============= ======= Key string Value type Default value Units ==================================== ========== ============= ======= Gesture.KeyTap.MinDownVelocity float 50 mm/s Gesture.KeyTap.HistorySeconds float 0.1 s Gesture.KeyTap.MinDistance float 3.0 mm ==================================== ========== ============= =======
The following example demonstrates how to set the key tap configuration parameters:
The Controller object must be connected to the Leap Motion service/daemon before setting the configuration parameters.
LEAP_EXPORT Leap::KeyTapGesture::KeyTapGesture | ( | ) |
Constructs a new KeyTapGesture object.
An uninitialized KeyTapGesture object is considered invalid. Get valid instances of the KeyTapGesture class from a Frame object.
LEAP_EXPORT Leap::KeyTapGesture::KeyTapGesture | ( | const Gesture & | rhs | ) |
Constructs a KeyTapGesture object from an instance of the Gesture class.
rhs | The Gesture instance to specialize. This Gesture instance must be a KeyTapGesture object. |
|
inlinestatic |
LEAP_EXPORT Vector Leap::KeyTapGesture::direction | ( | ) | const |
The direction of finger tip motion.
LEAP_EXPORT Pointable Leap::KeyTapGesture::pointable | ( | ) | const |
LEAP_EXPORT Vector Leap::KeyTapGesture::position | ( | ) | const |
LEAP_EXPORT float Leap::KeyTapGesture::progress | ( | ) | const |
The progress value is always 1.0 for a key tap gesture.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |