![]() |
Leap Motion C++ API Reference
0.8.0
|
The Finger class represents a tracked finger. More...
Inherits Leap::Pointable.
Public Member Functions | |
Finger () | |
Constructs a Finger object. | |
Finger (const Pointable &) | |
If the specified Pointable object represents a finger, creates a copy of it as a Finger object; otherwise, creates an invalid Finger object. | |
std::string | toString () const |
A string containing a brief, human readable description of the Finger object. | |
![]() | |
Vector | direction () const |
The direction in which this finger or tool is pointing. | |
Frame | frame () const |
The Frame associated with this Pointable object. | |
Hand | hand () const |
The Hand associated with this finger or tool. | |
int32_t | id () const |
A unique ID assigned to this Pointable object, whose value remains the same across consecutive frames while the tracked finger or tool remains visible. | |
bool | isFinger () const |
Whether or not the Pointable is believed to be a finger. | |
bool | isTool () const |
Whether or not the Pointable is believed to be a tool. | |
bool | isValid () const |
Reports whether this is a valid Pointable object. | |
float | length () const |
The estimated length of the finger or tool in millimeters. | |
bool | operator!= (const Pointable &) const |
Compare Pointable object inequality. | |
bool | operator== (const Pointable &) const |
Compare Pointable object equality. | |
Pointable () | |
Constructs a Pointable object. | |
Vector | stabilizedTipPosition () const |
The stabilized tip position of this Pointable. | |
Vector | tipPosition () const |
The tip position in millimeters from the Leap Motion origin. | |
Vector | tipVelocity () const |
The rate of change of the tip position in millimeters/second. | |
std::string | toString () const |
A string containing a brief, human readable description of the Pointable object. | |
float | touchDistance () const |
A value proportional to the distance between this Pointable object and the adaptive touch plane. | |
Zone | touchZone () const |
The current touch zone of this Pointable object. | |
float | width () const |
The estimated width of the finger or tool in millimeters. | |
Static Public Member Functions | |
static const Finger & | invalid () |
Returns an invalid Finger object. | |
![]() | |
static const Pointable & | invalid () |
Returns an invalid Pointable object. | |
Additional Inherited Members | |
![]() | |
enum | Zone { ZONE_NONE = 0, ZONE_HOVERING = 1, ZONE_TOUCHING = 2 } |
Defines the values for reporting the state of a Pointable object in relation to an adaptive touch plane. More... | |
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.
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.
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.)