#include <Leap.h>
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 Finger & | invalid () |
Static Public Member Functions inherited from Leap::Pointable | |
static LEAP_EXPORT const Pointable & | invalid () |
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 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 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.
enum Leap::Finger::Joint |
enum Leap::Finger::Type |
Enumerates the names of the fingers.
Members of this enumeration are returned by Finger::type() to identify a Finger object.
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 |
Leap::Finger::Finger | ( | FingerImplementation * | ) |
LEAP_EXPORT Leap::Finger::Finger | ( | ) |
|
explicit |
LEAP_EXPORT Bone Leap::Finger::bone | ( | Bone::Type | boneIx | ) | const |
The bone at a given bone index on this finger.
boneIx | An index value from the Bone::Type enumeration identifying the bone of interest. |
|
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.)
LEAP_EXPORT Vector Leap::Finger::jointPosition | ( | Joint | jointIx | ) | const |
Deprecated as of version 2.0 Use 'bone' method instead.
|
private |
|
inline |
LEAP_EXPORT Type Leap::Finger::type | ( | ) | const |
The name of this finger.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |