Methods:
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.
Public Functions
- Since
- 1.0
Public Static FunctionsBone bone(Bone.Type boneIx)The bone at a given bone index on this finger.
for (Finger finger : hand.fingers()) { for(Bone.Type boneType : Bone.Type.values()) { Bone bone = finger.bone(boneType); // ... Use the bone } }
- Return
- The Bone that has the specified bone type.
- Since
- 2.0
- Parameters
- boneIx -
An index value from the Bone::Type enumeration identifying the bone of interest.
Finger()Finger(Pointable arg0)Vector jointPosition(Finger.Joint jointIx)Deprecated as of version 2.0 Use ‘bone’ method instead.
String toString()Finger.Type type()The name of this finger.
Finger.Type fingerType = finger.type();
- Return
- The anatomical type of this finger as a member of the Finger::Type enumeration.
- Since
- 2.0
class Joint
Deprecated as of version 2.0.
class Type
Enumerates the names of the fingers.
Members of this enumeration are returned by Finger::type() to identify a Finger object.
- Since
- 2.0