Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
Leap::SwipeGesture Class Reference

#include <Leap.h>

Inheritance diagram for Leap::SwipeGesture:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
LEAP_EXPORT Vector direction () const
LEAP_EXPORT Pointable pointable () const
LEAP_EXPORT Vector position () const
LEAP_EXPORT float speed () const
LEAP_EXPORT Vector startPosition () const
LEAP_EXPORT SwipeGesture ()
LEAP_EXPORT SwipeGesture (const Gesture &rhs)

Static Public Member Functions

static Type classType ()

Public Attributes

 this

Static Public Attributes

tuple class_type = staticmethod(LeapPython.SwipeGesture_class_type)
tuple direction = _swig_property(LeapPython.SwipeGesture_direction_get)
tuple pointable = _swig_property(LeapPython.SwipeGesture_pointable_get)
tuple position = _swig_property(LeapPython.SwipeGesture_position_get)
tuple speed = _swig_property(LeapPython.SwipeGesture_speed_get)
tuple start_position = _swig_property(LeapPython.SwipeGesture_start_position_get)

Static Private Attributes

tuple __getattr__ = lambdaself,name:_swig_getattr(self, SwipeGesture, name)
 __repr__ = _swig_repr
tuple __setattr__ = lambdaself,name,value:_swig_setattr(self, SwipeGesture, name, value)
 __swig_destroy__ = LeapPython.delete_SwipeGesture
dictionary __swig_getmethods__ = {}
dictionary __swig_setmethods__ = {}

Detailed Description

The SwipeGesture class represents a swiping motion a finger or tool.

Leap_Gesture_Swipe.png

SwipeGesture objects are generated for each visible finger or tool. Swipe gestures are continuous; a gesture object with the same ID value will appear in each frame while the gesture continues.

**Important:** To use swipe gestures in your application, you must enable recognition of the swipe gesture. You can enable recognition with:

You can set the minimum length and velocity required for a movement to be recognized as a swipe using the config attribute of a connected Controller object. Use the following keys to configure swipe recognition:

==================================== ========== ============= ======= Key string Value type Default value Units ==================================== ========== ============= ======= Gesture.Swipe.MinLength float 150 mm Gesture.Swipe.MinVelocity float 1000 mm/s ==================================== ========== ============= =======

The following example demonstrates how to set the swipe configuration parameters:

The Controller object must be connected to the Leap Motion service/daemon before setting the configuration parameters.

Since:
1.0

Definition at line 2119 of file Leap.h.


Constructor & Destructor Documentation

Constructs a SwipeGesture object from an instance of the Gesture class.

Parameters:
rhsThe Gesture instance to specialize. This Gesture instance must be a SwipeGesture object.
Since:
1.0
def Leap::SwipeGesture::__init__ (   self,
  args 
)

Reimplemented from Leap::Gesture.

Definition at line 924 of file Leap.py.


Member Function Documentation

static Type Leap::SwipeGesture::classType ( ) [inline, static]

The swipe gesture type.

Returns:
Type The type value designating a swipe gesture.
Since:
1.0

Definition at line 2130 of file Leap.h.

The unit direction vector parallel to the swipe motion.

You can compare the components of the vector to classify the swipe as appropriate for your application. For example, if you are using swipes for two dimensional scrolling, you can compare the x and y values to determine if the swipe is primarily horizontal or vertical.

Returns:
Vector The unit direction vector representing the swipe motion.
Since:
1.0

The finger performing the swipe gesture.

Returns:
Pointable A Pointable object representing the swiping finger.
Since:
1.0

The current position of the swipe.

Returns:
Vector The current swipe position within the Leap Motion frame of reference, in mm.
Since:
1.0

The swipe speed in mm/second.

Returns:
float The speed of the finger performing the swipe gesture in millimeters per second.
Since:
1.0

The position where the swipe began.

Returns:
Vector The starting position within the Leap Motion frame of reference, in mm.
Since:
1.0

Member Data Documentation

tuple Leap::SwipeGesture::__getattr__ = lambdaself,name:_swig_getattr(self, SwipeGesture, name) [static, private]

Reimplemented from Leap::Gesture.

Definition at line 918 of file Leap.py.

Reimplemented from Leap::Gesture.

Definition at line 919 of file Leap.py.

tuple Leap::SwipeGesture::__setattr__ = lambdaself,name,value:_swig_setattr(self, SwipeGesture, name, value) [static, private]

Reimplemented from Leap::Gesture.

Definition at line 914 of file Leap.py.

Leap::SwipeGesture::__swig_destroy__ = LeapPython.delete_SwipeGesture [static, private]

Reimplemented from Leap::Gesture.

Definition at line 945 of file Leap.py.

dictionary Leap::SwipeGesture::__swig_getmethods__ = {} [static, private]

Reimplemented from Leap::Gesture.

Definition at line 915 of file Leap.py.

dictionary Leap::SwipeGesture::__swig_setmethods__ = {} [static, private]

Reimplemented from Leap::Gesture.

Definition at line 911 of file Leap.py.

tuple Leap::SwipeGesture::class_type = staticmethod(LeapPython.SwipeGesture_class_type) [static]

Definition at line 922 of file Leap.py.

tuple Leap::SwipeGesture::direction = _swig_property(LeapPython.SwipeGesture_direction_get) [static]

Definition at line 938 of file Leap.py.

tuple Leap::SwipeGesture::pointable = _swig_property(LeapPython.SwipeGesture_pointable_get) [static]

Definition at line 944 of file Leap.py.

tuple Leap::SwipeGesture::position = _swig_property(LeapPython.SwipeGesture_position_get) [static]

Definition at line 935 of file Leap.py.

tuple Leap::SwipeGesture::speed = _swig_property(LeapPython.SwipeGesture_speed_get) [static]

Definition at line 941 of file Leap.py.

tuple Leap::SwipeGesture::start_position = _swig_property(LeapPython.SwipeGesture_start_position_get) [static]

Definition at line 932 of file Leap.py.

Reimplemented from Leap::Gesture.

Definition at line 924 of file Leap.py.


The documentation for this class was generated from the following files:


leap_motion
Author(s): Florian Lier , Mirza Shah , Isaac IY Saito
autogenerated on Sat Jun 8 2019 18:47:25