The Finger class represents a tracked finger. More...
Public Types | |
enum | FingerType |
Enumerates the names of the fingers. More... | |
Public Member Functions | |
Bone | Bone (Bone.BoneType boneIx) |
The bone at a given bone index on this finger. More... | |
Finger () | |
Constructs a finger. More... | |
Finger (long frameId, int handId, int fingerId, float timeVisible, Vector tipPosition, Vector tipVelocity, Vector direction, Vector stabilizedTipPosition, float width, float length, bool isExtended, Finger.FingerType type, Bone metacarpal, Bone proximal, Bone intermediate, Bone distal) | |
Constructs a finger. More... | |
override string | ToString () |
A string containing a brief, human readable description of the Finger object. More... | |
Public Attributes | |
Vector | Direction |
The direction in which this finger or tool is pointing. More... | |
int | HandId |
The Hand associated with a finger. More... | |
int | Id |
A unique ID assigned to this Finger object, whose value remains the same across consecutive frames while the tracked finger or tool remains visible. More... | |
bool | IsExtended |
Whether or not this Finger is in an extended posture. More... | |
float | Length |
The estimated length of the finger or tool in millimeters. More... | |
Vector | StabilizedTipPosition |
The stabilized tip position of this Finger. More... | |
float | TimeVisible |
The duration of time this Finger has been visible to the Leap Motion Controller. More... | |
Vector | TipPosition |
The tip position in millimeters from the Leap Motion origin. More... | |
Vector | TipVelocity |
The rate of change of the tip position in millimeters/second. More... | |
Finger.FingerType | Type |
The name of this finger. More... | |
float | Width |
The estimated width of the finger or tool in millimeters. More... | |
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.
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.
|
strong |
Enumerates the names of the fingers.
Members of this enumeration are returned by Finger::type() to identify a Finger object.
Enumerator | |
---|---|
TYPE_PINKY |
The pinky or little finger. |
Finger | ( | ) |
Finger | ( | long | frameId, |
int | handId, | ||
int | fingerId, | ||
float | timeVisible, | ||
Vector | tipPosition, | ||
Vector | tipVelocity, | ||
Vector | direction, | ||
Vector | stabilizedTipPosition, | ||
float | width, | ||
float | length, | ||
bool | isExtended, | ||
Finger.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.
frameId | The id of the frame this finger appears in. |
handId | The id of the hand this finger belongs to. |
fingerId | The id of this finger (handId + 0-4 for finger position). |
timeVisible | How long this instance of the finger has been visible. |
tipPosition | The position of the finger tip. |
tipVelocity | The velocity of the finger tip. |
direction | The pointing direction of the finger. |
stabilizedTipPosition | The stabilized tip position. |
width | The average width of the finger. |
length | The length of the finger. |
isExtended | Whether the finger is more-or-less straight. |
type | The finger name. |
metacarpal | The first bone of the finger (inside the hand). |
proximal | The second bone of the finger |
intermediate | The third bone of the finger. |
distal | The end bone. |
Bone Bone | ( | Bone.BoneType | boneIx | ) |
The bone at a given bone index on this finger.
boneIx | An index value from the Bone::Type enumeration identifying the bone of interest. |
override string ToString | ( | ) |
Vector Direction |
int HandId |
int Id |
A unique ID assigned to this Finger object, whose value remains the same across consecutive frames while the tracked finger or tool remains visible.
If tracking is lost (for example, when a finger is occluded by another finger or when it is withdrawn from the Leap Motion Controller field of view), the Leap Motion software may assign a new ID when it detects the entity in a future frame.
Use the ID value with the Frame::pointable() function 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.
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. Tools are always extended.
float Length |
The estimated length of the finger or tool in millimeters.
Vector StabilizedTipPosition |
The stabilized tip position of this Finger.
Smoothing and stabilization is performed in order to make this value more suitable for interaction with 2D content. The stabilized position lags behind the tip position by a variable amount, depending primarily on the speed of movement.
float TimeVisible |
The duration of time this Finger has been visible to the Leap Motion Controller.
Vector TipPosition |
Vector TipVelocity |
The rate of change of the tip position in millimeters/second.
Finger.FingerType Type |
The name of this finger.
float Width |
The estimated width of the finger or tool in millimeters.