#include <Leap.h>
The Finger class represents a tracked finger.
Fingers are Pointable objects that the Leap has classified as a finger. Get valid Finger objects from a Frame or a Hand object.
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.
Public Member Functions | |
Finger (FingerImplementation *) | |
LEAP_EXPORT | Finger () |
LEAP_EXPORT | Finger (const Pointable &) |
LEAP_EXPORT std::string | toString () const |
![]() | |
Pointable (PointableImplementation *) | |
Pointable (FingerImplementation *) | |
Pointable (ToolImplementation *) | |
LEAP_EXPORT | Pointable () |
LEAP_EXPORT int32_t | id () const |
LEAP_EXPORT Frame | frame () const |
LEAP_EXPORT Hand | hand () const |
LEAP_EXPORT Vector | tipPosition () const |
LEAP_EXPORT Vector | tipVelocity () const |
LEAP_EXPORT Vector | direction () const |
LEAP_EXPORT float | width () const |
LEAP_EXPORT float | length () const |
LEAP_EXPORT bool | isFinger () const |
LEAP_EXPORT bool | isTool () const |
LEAP_EXPORT bool | isValid () const |
LEAP_EXPORT bool | operator== (const Pointable &) const |
LEAP_EXPORT bool | operator!= (const Pointable &) const |
LEAP_EXPORT std::string | toString () const |
Static Public Member Functions | |
static LEAP_EXPORT const Finger & | invalid () |
![]() | |
static LEAP_EXPORT const Pointable & | invalid () |
Additional Inherited Members | |
![]() | |
class SharedObject * | m_object |
![]() | |
LEAP_EXPORT | Interface (void *owner) |
LEAP_EXPORT | Interface (Implementation *reference, void *owner) |
LEAP_EXPORT | Interface (const Interface &rhs) |
LEAP_EXPORT Interface & | operator= (const Interface &rhs) |
virtual LEAP_EXPORT | ~Interface () |
template<typename T > | |
T * | get () const |
Leap::Finger::Finger | ( | FingerImplementation * | ) |
LEAP_EXPORT Leap::Finger::Finger | ( | ) |
|
explicit |
|
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.)