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

#include <Leap.h>

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

Public Types

enum  Joint { JOINT_MCP = 0, JOINT_PIP = 1, JOINT_DIP = 2, JOINT_TIP = 3 }
 
enum  Type {
  TYPE_THUMB = 0, TYPE_INDEX = 1, TYPE_MIDDLE = 2, TYPE_RING = 3,
  TYPE_PINKY = 4
}
 
- Public Types inherited from Leap::Pointable
enum  Zone { ZONE_NONE = 0, ZONE_HOVERING = 1, ZONE_TOUCHING = 2 }
 

Public Member Functions

def __init__ (self, args)
 
def __str__ (self)
 
def bone (self, boneIx)
 
LEAP_EXPORT Bone bone (Bone::Type boneIx) const
 
 Finger (FingerImplementation *)
 
LEAP_EXPORT Finger ()
 
LEAP_EXPORT Finger (const Pointable &)
 
def joint_position (self, jointIx)
 
LEAP_EXPORT Vector jointPosition (Joint jointIx) const
 
std::string toString () const
 
LEAP_EXPORT Type type () const
 
- Public Member Functions inherited from Leap::Pointable
def __eq__ (self, arg2)
 
def __init__ (self)
 
def __ne__ (self, arg2)
 
def __str__ (self)
 
LEAP_EXPORT Vector direction () const
 
LEAP_EXPORT Frame frame () const
 
LEAP_EXPORT Hand hand () const
 
LEAP_EXPORT int32_t id () const
 
LEAP_EXPORT bool isExtended () const
 
LEAP_EXPORT bool isFinger () const
 
LEAP_EXPORT bool isTool () const
 
LEAP_EXPORT bool isValid () const
 
LEAP_EXPORT float length () const
 
LEAP_EXPORT bool operator!= (const Pointable &) const
 
LEAP_EXPORT bool operator== (const Pointable &) const
 
 Pointable (PointableImplementation *)
 
 Pointable (FingerImplementation *)
 
 Pointable (ToolImplementation *)
 
LEAP_EXPORT Pointable ()
 
LEAP_EXPORT Vector stabilizedTipPosition () const
 
LEAP_EXPORT float timeVisible () const
 
LEAP_EXPORT Vector tipPosition () const
 
LEAP_EXPORT Vector tipVelocity () const
 
std::string toString () const
 
LEAP_EXPORT float touchDistance () const
 
LEAP_EXPORT Zone touchZone () const
 
LEAP_EXPORT float width () const
 
- Public Member Functions inherited from Leap::Interface
def __init__ (self, args, kwargs)
 

Static Public Member Functions

static LEAP_EXPORT const Fingerinvalid ()
 
- Static Public Member Functions inherited from Leap::Pointable
static LEAP_EXPORT const Pointableinvalid ()
 

Public Attributes

 this
 
- Public Attributes inherited from Leap::Pointable
 this
 

Static Public Attributes

 JOINT_DIP = LeapPython.Finger_JOINT_DIP
 
 JOINT_MCP = LeapPython.Finger_JOINT_MCP
 
 JOINT_PIP = LeapPython.Finger_JOINT_PIP
 
 JOINT_TIP = LeapPython.Finger_JOINT_TIP
 
 type = _swig_property(LeapPython.Finger_type_get)
 
 TYPE_INDEX = LeapPython.Finger_TYPE_INDEX
 
 TYPE_MIDDLE = LeapPython.Finger_TYPE_MIDDLE
 
 TYPE_PINKY = LeapPython.Finger_TYPE_PINKY
 
 TYPE_RING = LeapPython.Finger_TYPE_RING
 
 TYPE_THUMB = LeapPython.Finger_TYPE_THUMB
 
- Static Public Attributes inherited from Leap::Pointable
 direction = _swig_property(LeapPython.Pointable_direction_get)
 
 frame = _swig_property(LeapPython.Pointable_frame_get)
 
 hand = _swig_property(LeapPython.Pointable_hand_get)
 
 id = _swig_property(LeapPython.Pointable_id_get)
 
 is_extended = _swig_property(LeapPython.Pointable_is_extended_get)
 
 is_finger = _swig_property(LeapPython.Pointable_is_finger_get)
 
 is_tool = _swig_property(LeapPython.Pointable_is_tool_get)
 
 is_valid = _swig_property(LeapPython.Pointable_is_valid_get)
 
 length = _swig_property(LeapPython.Pointable_length_get)
 
 stabilized_tip_position = _swig_property(LeapPython.Pointable_stabilized_tip_position_get)
 
 time_visible = _swig_property(LeapPython.Pointable_time_visible_get)
 
 tip_position = _swig_property(LeapPython.Pointable_tip_position_get)
 
 tip_velocity = _swig_property(LeapPython.Pointable_tip_velocity_get)
 
 touch_distance = _swig_property(LeapPython.Pointable_touch_distance_get)
 
 touch_zone = _swig_property(LeapPython.Pointable_touch_zone_get)
 
 width = _swig_property(LeapPython.Pointable_width_get)
 
 ZONE_HOVERING = LeapPython.Pointable_ZONE_HOVERING
 
 ZONE_NONE = LeapPython.Pointable_ZONE_NONE
 
 ZONE_TOUCHING = LeapPython.Pointable_ZONE_TOUCHING
 

Private Member Functions

LEAP_EXPORT const char * toCString () const
 

Static Private Attributes

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

Additional Inherited Members

- 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 Finger class represents a tracked finger.

Fingers are Pointable objects that the Leap Motion software has classified as a finger. Get valid Finger objects from a Frame or a Hand object.

Fingers may be permanently associated to a hand. In this case the angular order of the finger IDs will be invariant. As fingers move in and out of view it is possible for the guessed ID of a finger to be incorrect. Consequently, it may be necessary for finger IDs to be exchanged. All tracked properties, such as velocity, will remain continuous in the API. However, quantities that are derived from the API output (such as a history of positions) will be discontinuous unless they have a corresponding ID exchange.

Note that Finger objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical finger. Invalid Finger objects can be the result of asking for a Finger object using an ID from an earlier frame when no Finger objects with that ID exist in the current frame. A Finger object created from the Finger constructor is also invalid. Test for validity with the Finger::isValid() function.

Since
1.0

Definition at line 891 of file Leap.h.

Member Enumeration Documentation

Deprecated as of version 2.0

Enumerator
JOINT_MCP 
JOINT_PIP 
JOINT_DIP 
JOINT_TIP 

Definition at line 896 of file Leap.h.

Enumerates the names of the fingers.

Members of this enumeration are returned by Finger::type() to identify a Finger object.

Since
2.0
Enumerator
TYPE_THUMB 

The thumb

TYPE_INDEX 

The index or fore-finger

TYPE_MIDDLE 

The middle finger

TYPE_RING 

The ring finger

TYPE_PINKY 

The pinky or little finger

Definition at line 910 of file Leap.h.

Constructor & Destructor Documentation

Leap::Finger::Finger ( FingerImplementation *  )
LEAP_EXPORT Leap::Finger::Finger ( )

Constructs a Finger object.

An uninitialized finger is considered invalid. Get valid Finger objects from a Frame or a Hand object.

Since
1.0
LEAP_EXPORT Leap::Finger::Finger ( const Pointable )
explicit

If the specified Pointable object represents a finger, creates a copy of it as a Finger object; otherwise, creates an invalid Finger object.

Since
1.0
def Leap.Finger.__init__ (   self,
  args 
)

Definition at line 658 of file Leap.py.

Member Function Documentation

def Leap.Finger.__str__ (   self)

Definition at line 671 of file Leap.py.

def Leap.Finger.bone (   self,
  boneIx 
)

Definition at line 668 of file Leap.py.

LEAP_EXPORT Bone Leap::Finger::bone ( Bone::Type  boneIx) const

The bone at a given bone index on this finger.

Parameters
boneIxAn index value from the Bone::Type enumeration identifying the bone of interest.
Returns
The Bone that has the specified bone type.
Since
2.0
static LEAP_EXPORT const Finger& Leap::Finger::invalid ( )
static

Returns an invalid Finger object.

You can use the instance returned by this function in comparisons testing whether a given Finger instance is valid or invalid. (You can also use the Finger::isValid() function.)

Returns
The invalid Finger instance.
Since
1.0
def Leap.Finger.joint_position (   self,
  jointIx 
)

Definition at line 665 of file Leap.py.

LEAP_EXPORT Vector Leap::Finger::jointPosition ( Joint  jointIx) const

Deprecated as of version 2.0 Use 'bone' method instead.

LEAP_EXPORT const char* Leap::Finger::toCString ( ) const
private
std::string Leap::Finger::toString ( ) const
inline

A string containing a brief, human readable description of the Finger object.

Returns
A description of the Finger object as a string.
Since
1.0

Definition at line 991 of file Leap.h.

LEAP_EXPORT Type Leap::Finger::type ( ) const

The name of this finger.

Returns
The anatomical type of this finger as a member of the Finger::Type enumeration.
Since
2.0

Member Data Documentation

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

Definition at line 646 of file Leap.py.

Leap.Finger.__repr__ = _swig_repr
staticprivate

Definition at line 647 of file Leap.py.

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

Definition at line 642 of file Leap.py.

Leap.Finger.__swig_destroy__ = LeapPython.delete_Finger
staticprivate

Definition at line 676 of file Leap.py.

dictionary Leap.Finger.__swig_getmethods__ = {}
staticprivate

Definition at line 643 of file Leap.py.

dictionary Leap.Finger.__swig_setmethods__ = {}
staticprivate

Definition at line 639 of file Leap.py.

Leap.Finger.JOINT_DIP = LeapPython.Finger_JOINT_DIP
static

Definition at line 650 of file Leap.py.

Leap.Finger.JOINT_MCP = LeapPython.Finger_JOINT_MCP
static

Definition at line 648 of file Leap.py.

Leap.Finger.JOINT_PIP = LeapPython.Finger_JOINT_PIP
static

Definition at line 649 of file Leap.py.

Leap.Finger.JOINT_TIP = LeapPython.Finger_JOINT_TIP
static

Definition at line 651 of file Leap.py.

Leap.Finger.this

Definition at line 663 of file Leap.py.

Leap.Finger.type = _swig_property(LeapPython.Finger_type_get)
static

Definition at line 675 of file Leap.py.

Leap.Finger.TYPE_INDEX = LeapPython.Finger_TYPE_INDEX
static

Definition at line 653 of file Leap.py.

Leap.Finger.TYPE_MIDDLE = LeapPython.Finger_TYPE_MIDDLE
static

Definition at line 654 of file Leap.py.

Leap.Finger.TYPE_PINKY = LeapPython.Finger_TYPE_PINKY
static

Definition at line 656 of file Leap.py.

Leap.Finger.TYPE_RING = LeapPython.Finger_TYPE_RING
static

Definition at line 655 of file Leap.py.

Leap.Finger.TYPE_THUMB = LeapPython.Finger_TYPE_THUMB
static

Definition at line 652 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