Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | List of all members
Leap::CircleGesture Class Reference

#include <Leap.h>

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

Public Member Functions

def __init__ (self, args)
 
LEAP_EXPORT Vector center () const
 
LEAP_EXPORT CircleGesture ()
 
LEAP_EXPORT CircleGesture (const Gesture &rhs)
 
LEAP_EXPORT Vector normal () const
 
LEAP_EXPORT Pointable pointable () const
 
LEAP_EXPORT float progress () const
 
LEAP_EXPORT float radius () const
 
- Public Member Functions inherited from Leap::Gesture
def __eq__ (self, rhs)
 
def __init__ (self, args)
 
def __ne__ (self, rhs)
 
def __str__ (self)
 
LEAP_EXPORT int64_t duration () const
 
LEAP_EXPORT float durationSeconds () const
 
LEAP_EXPORT Frame frame () const
 
 Gesture (GestureImplementation *)
 
LEAP_EXPORT Gesture ()
 
LEAP_EXPORT Gesture (const Gesture &rhs)
 
LEAP_EXPORT HandList hands () const
 
LEAP_EXPORT int32_t id () const
 
LEAP_EXPORT bool isValid () const
 
LEAP_EXPORT bool operator!= (const Gesture &rhs) const
 
LEAP_EXPORT bool operator== (const Gesture &rhs) const
 
LEAP_EXPORT PointableList pointables () const
 
LEAP_EXPORT State state () const
 
std::string toString () const
 
LEAP_EXPORT Type type () const
 
- Public Member Functions inherited from Leap::Interface
def __init__ (self, args, kwargs)
 

Static Public Member Functions

static Type classType ()
 
- Static Public Member Functions inherited from Leap::Gesture
static LEAP_EXPORT const Gestureinvalid ()
 

Public Attributes

 this
 
- Public Attributes inherited from Leap::Gesture
 this
 

Static Public Attributes

 center = _swig_property(LeapPython.CircleGesture_center_get)
 
 class_type = staticmethod(LeapPython.CircleGesture_class_type)
 
 normal = _swig_property(LeapPython.CircleGesture_normal_get)
 
 pointable = _swig_property(LeapPython.CircleGesture_pointable_get)
 
 progress = _swig_property(LeapPython.CircleGesture_progress_get)
 
 radius = _swig_property(LeapPython.CircleGesture_radius_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, CircleGesture, name)
 
 __repr__ = _swig_repr
 
 __setattr__ = lambdaself,name,value:_swig_setattr(self, CircleGesture, name, value)
 
 __swig_destroy__ = LeapPython.delete_CircleGesture
 
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 Interfaceoperator= (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
 

Detailed Description

The CircleGesture classes represents a circular finger movement.

A circle movement is recognized when the tip of a finger draws a circle within the Leap Motion Controller field of view.

Leap_Gesture_Circle.png

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

Circle gestures are continuous. The CircleGesture objects for the gesture have three possible states:

State::STATE_START – The circle gesture has just started. The movement has progressed far enough for the recognizer to classify it as a circle.

State::STATE_UPDATE – The circle gesture is continuing.

State::STATE_STOP – The circle gesture is finished.

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

==================================== ========== ============= ======= Key string Value type Default value Units ==================================== ========== ============= ======= Gesture.Circle.MinRadius float 5.0 mm Gesture.Circle.MinArc float 1.5 * pi radians ==================================== ========== ============= =======

The following example demonstrates how to set the circle 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 2251 of file Leap.h.

Constructor & Destructor Documentation

LEAP_EXPORT Leap::CircleGesture::CircleGesture ( )

Constructs a new CircleGesture object.

An uninitialized CircleGesture object is considered invalid. Get valid instances of the CircleGesture class from a Frame object.

Since
1.0
LEAP_EXPORT Leap::CircleGesture::CircleGesture ( const Gesture rhs)

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

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

Definition at line 968 of file Leap.py.

Member Function Documentation

LEAP_EXPORT Vector Leap::CircleGesture::center ( ) const

The center point of the circle within the Leap Motion frame of reference.

Returns
Vector The center of the circle in mm from the Leap Motion origin.
Since
1.0
static Type Leap::CircleGesture::classType ( )
inlinestatic

The circle gesture type.

Returns
Type The type value designating a circle gesture.
Since
1.0

Definition at line 2262 of file Leap.h.

LEAP_EXPORT Vector Leap::CircleGesture::normal ( ) const

Returns the normal vector for the circle being traced.

If you draw the circle clockwise, the normal vector points in the same general direction as the pointable object drawing the circle. If you draw the circle counterclockwise, the normal points back toward the pointable. If the angle between the normal and the pointable object drawing the circle is less than 90 degrees, then the circle is clockwise.

Returns
Vector the normal vector for the circle being traced
Since
1.0
LEAP_EXPORT Pointable Leap::CircleGesture::pointable ( ) const

The finger performing the circle gesture.

Returns
Pointable A Pointable object representing the circling finger.
Since
1.0
LEAP_EXPORT float Leap::CircleGesture::progress ( ) const

The number of times the finger tip has traversed the circle.

Progress is reported as a positive number of the number. For example, a progress value of .5 indicates that the finger has gone halfway around, while a value of 3 indicates that the finger has gone around the the circle three times.

Progress starts where the circle gesture began. Since the circle must be partially formed before the Leap Motion software can recognize it, progress will be greater than zero when a circle gesture first appears in the frame.

Returns
float A positive number indicating the gesture progress.
Since
1.0
LEAP_EXPORT float Leap::CircleGesture::radius ( ) const

The radius of the circle.

Returns
The circle radius in mm.
Since
1.0

Member Data Documentation

Leap.CircleGesture.__getattr__ = lambdaself,name:_swig_getattr(self, CircleGesture, name)
staticprivate

Definition at line 962 of file Leap.py.

Leap.CircleGesture.__repr__ = _swig_repr
staticprivate

Definition at line 963 of file Leap.py.

Leap.CircleGesture.__setattr__ = lambdaself,name,value:_swig_setattr(self, CircleGesture, name, value)
staticprivate

Definition at line 958 of file Leap.py.

Leap.CircleGesture.__swig_destroy__ = LeapPython.delete_CircleGesture
staticprivate

Definition at line 989 of file Leap.py.

dictionary Leap.CircleGesture.__swig_getmethods__ = {}
staticprivate

Definition at line 959 of file Leap.py.

dictionary Leap.CircleGesture.__swig_setmethods__ = {}
staticprivate

Definition at line 955 of file Leap.py.

Leap.CircleGesture.center = _swig_property(LeapPython.CircleGesture_center_get)
static

Definition at line 976 of file Leap.py.

Leap.CircleGesture.class_type = staticmethod(LeapPython.CircleGesture_class_type)
static

Definition at line 966 of file Leap.py.

Leap.CircleGesture.normal = _swig_property(LeapPython.CircleGesture_normal_get)
static

Definition at line 979 of file Leap.py.

Leap.CircleGesture.pointable = _swig_property(LeapPython.CircleGesture_pointable_get)
static

Definition at line 988 of file Leap.py.

Leap.CircleGesture.progress = _swig_property(LeapPython.CircleGesture_progress_get)
static

Definition at line 982 of file Leap.py.

Leap.CircleGesture.radius = _swig_property(LeapPython.CircleGesture_radius_get)
static

Definition at line 985 of file Leap.py.

Leap.CircleGesture.this

Definition at line 973 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 Tue Jun 2 2020 03:58:01