Class Leap::Finger¶
- class Leap.Finger¶
The Finger class represents a tracked finger.
Fingers are objects that the Leap Motion software has classified as a finger. Get valid Finger objects from a Frame or a Hand object.
- Since
1.0
Public Types
Public Functions
- Finger ()¶
Constructs a finger.
An uninitialized finger is considered invalid. Get valid Finger objects from a Hand object.
- Since
3.0
- Finger (long frameId, int handId, int fingerId, float timeVisible, Vector3 tipPosition, Vector3 direction, float width, float length, bool isExtended, FingerType type, Bone metacarpal, Bone proximal, Bone intermediate, Bone distal)
Constructs a finger.
Generally, you should not create your own finger objects. Such objects will not have valid tracking data. Get valid finger objects from a hand in a frame received from the service.
Public Members
- Bone[] bones = new Bone[4]¶
An array of Bone objects that represents each bone of the finger
There are 4 bones per finger by default
- Since
3.0
- Finger.FingerType Type¶
The type of this finger.
- Since
2.0
- int Id¶
A unique ID assigned to this Finger object, whose value remains the same across consecutive frames while the tracked hand remains visible. If tracking of the hand is lost, the Leap Motion software may assign a new ID when it detects the hand in a future frame.
Use the ID value to find this Finger object in future frames.
IDs should be from 1 to 100 (inclusive). If more than 100 objects are tracked an IDs of -1 will be used until an ID in the defined range is available.
- Since
1.0
- Vector3 Direction¶
The direction in which this finger or tool is pointing. The direction is expressed as a unit vector pointing in the same direction as the intermediate bone.
- Since
1.0
- float Width¶
The estimated width of the finger.
- Since
1.0
- float Length¶
The estimated length of the finger.
- Since
1.0
- bool IsExtended¶
Whether or not this Finger is in an extended posture.
A finger is considered extended if it is extended straight from the hand as if pointing. A finger is not extended when it is bent down and curled towards the palm.
- Since
2.0
- float TimeVisible¶
The duration of time this Finger has been visible to the Leap Motion Controller.
- Since
1.0