#include <Leap.h>
Public Member Functions | |
def | __init__ |
LEAP_EXPORT Vector | direction () const |
LEAP_EXPORT Pointable | pointable () const |
LEAP_EXPORT Vector | position () const |
LEAP_EXPORT float | progress () const |
LEAP_EXPORT | ScreenTapGesture () |
LEAP_EXPORT | ScreenTapGesture (const Gesture &rhs) |
Static Public Member Functions | |
static Type | classType () |
Public Attributes | |
this | |
Static Public Attributes | |
tuple | class_type = staticmethod(LeapPython.ScreenTapGesture_class_type) |
tuple | direction = _swig_property(LeapPython.ScreenTapGesture_direction_get) |
tuple | pointable = _swig_property(LeapPython.ScreenTapGesture_pointable_get) |
tuple | position = _swig_property(LeapPython.ScreenTapGesture_position_get) |
tuple | progress = _swig_property(LeapPython.ScreenTapGesture_progress_get) |
Static Private Attributes | |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, ScreenTapGesture, name) |
__repr__ = _swig_repr | |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, ScreenTapGesture, name, value) |
__swig_destroy__ = LeapPython.delete_ScreenTapGesture | |
dictionary | __swig_getmethods__ = {} |
dictionary | __swig_setmethods__ = {} |
The ScreenTapGesture class represents a tapping gesture by a finger or tool.
A screen tap gesture is recognized when the tip of a finger pokes forward and then springs back to approximately the original position, as if tapping a vertical screen. The tapping finger must pause briefly before beginning the tap.
**Important:** To use screen tap gestures in your application, you must enable recognition of the screen tap gesture. You can enable recognition with:
ScreenTap gestures are discrete. The ScreenTapGesture object representing a tap always has the state, STATE_STOP. Only one ScreenTapGesture object is created for each screen tap gesture recognized.
You can set the minimum finger movement and velocity required for a movement to be recognized as a screen tap as well as adjust the detection window for evaluating the movement using the config attribute of a connected Controller object. Use the following keys to configure screen tap recognition:
==================================== ========== ============= ======= Key string Value type Default value Units ==================================== ========== ============= ======= Gesture.ScreenTap.MinForwardVelocity float 50 mm/s Gesture.ScreenTap.HistorySeconds float 0.1 s Gesture.ScreenTap.MinDistance float 5.0 mm ==================================== ========== ============= =======
The following example demonstrates how to set the screen tap configuration parameters:
The Controller object must be connected to the Leap Motion service/daemon before setting the configuration parameters.
Constructs a new ScreenTapGesture object.
An uninitialized ScreenTapGesture object is considered invalid. Get valid instances of the ScreenTapGesture class from a Frame object.
LEAP_EXPORT Leap::ScreenTapGesture::ScreenTapGesture | ( | const Gesture & | rhs | ) |
Constructs a ScreenTapGesture object from an instance of the Gesture class.
rhs | The Gesture instance to specialize. This Gesture instance must be a ScreenTapGesture object. |
def Leap::ScreenTapGesture::__init__ | ( | self, | |
args | |||
) |
Reimplemented from Leap::Gesture.
static Type Leap::ScreenTapGesture::classType | ( | ) | [inline, static] |
LEAP_EXPORT float Leap::ScreenTapGesture::progress | ( | ) | const |
The progress value is always 1.0 for a screen tap gesture.
tuple Leap::ScreenTapGesture::__getattr__ = lambdaself,name:_swig_getattr(self, ScreenTapGesture, name) [static, private] |
Reimplemented from Leap::Gesture.
Leap::ScreenTapGesture::__repr__ = _swig_repr [static, private] |
Reimplemented from Leap::Gesture.
tuple Leap::ScreenTapGesture::__setattr__ = lambdaself,name,value:_swig_setattr(self, ScreenTapGesture, name, value) [static, private] |
Reimplemented from Leap::Gesture.
Leap::ScreenTapGesture::__swig_destroy__ = LeapPython.delete_ScreenTapGesture [static, private] |
Reimplemented from Leap::Gesture.
dictionary Leap::ScreenTapGesture::__swig_getmethods__ = {} [static, private] |
Reimplemented from Leap::Gesture.
dictionary Leap::ScreenTapGesture::__swig_setmethods__ = {} [static, private] |
Reimplemented from Leap::Gesture.
tuple Leap::ScreenTapGesture::class_type = staticmethod(LeapPython.ScreenTapGesture_class_type) [static] |
tuple Leap::ScreenTapGesture::direction = _swig_property(LeapPython.ScreenTapGesture_direction_get) [static] |
tuple Leap::ScreenTapGesture::pointable = _swig_property(LeapPython.ScreenTapGesture_pointable_get) [static] |
tuple Leap::ScreenTapGesture::position = _swig_property(LeapPython.ScreenTapGesture_position_get) [static] |
tuple Leap::ScreenTapGesture::progress = _swig_property(LeapPython.ScreenTapGesture_progress_get) [static] |
Reimplemented from Leap::Gesture.