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

enum FingerType

Enumerates the names of the fingers.

Members of this enumeration are returned by Finger.Type() to identify a Finger object.

Since

2.0

Values:

TYPE_THUMB
TYPE_INDEX
TYPE_MIDDLE
TYPE_RING
TYPE_PINKY
TYPE_UNKNOWN

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, Vector tipPosition, Vector 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.

Since

3.0

Bone Bone (Bone.BoneType boneIx)

The bone at a given bone index on this finger.

Since

2.0

override string ToString ()

A string containing a brief, human readable description of the Finger object.

Since

1.0

Public Members

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

int HandId

The Hand associated with a finger.

Since

1.0

Vector TipPosition

The tip position of this Finger.

Since

1.0

Vector 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 tip.

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