Tanoda
Leap.Finger Class Reference

The Finger class represents a tracked finger. More...

Public Types

enum  FingerType {
  TYPE_THUMB = 0 , TYPE_INDEX = 1 , TYPE_MIDDLE = 2 , TYPE_RING = 3 ,
  TYPE_PINKY = 4 , TYPE_UNKNOWN = -1
}
 Enumerates the names of the fingers. More...
 

Public Member Functions

 Finger ()
 Constructs a finger. More...
 
 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. More...
 
Bone Bone (Bone.BoneType boneIx)
 The bone at a given bone index on this finger. More...
 
override string ToString ()
 A string containing a brief, human readable description of the Finger object. More...
 

Public Attributes

Bone[] bones = new Bone[4]
 
Finger.FingerType Type
 The type of this finger. More...
 
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. More...
 
int HandId
 The Hand associated with a finger. More...
 
Vector TipPosition
 The tip position of this Finger. More...
 
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. More...
 
float Width
 The estimated width of the finger. More...
 
float Length
 The estimated length of the finger. More...
 
bool IsExtended
 Whether or not this Finger is in an extended posture. More...
 
float TimeVisible
 The duration of time this Finger has been visible to the Leap Motion Controller. More...
 

Detailed Description

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

Definition at line 20 of file Finger.cs.

Member Enumeration Documentation

◆ FingerType

Enumerates the names of the fingers.

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

Since
2.0
Enumerator
TYPE_THUMB 
TYPE_INDEX 
TYPE_MIDDLE 
TYPE_RING 
TYPE_PINKY 
TYPE_UNKNOWN 

Definition at line 167 of file Finger.cs.

Constructor & Destructor Documentation

◆ Finger() [1/2]

Leap.Finger.Finger ( )

Constructs a finger.

An uninitialized finger is considered invalid. Get valid Finger objects from a Hand object.

Since
3.0

Definition at line 31 of file Finger.cs.

◆ Finger() [2/2]

Leap.Finger.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

Definition at line 46 of file Finger.cs.

Member Function Documentation

◆ Bone()

Bone Leap.Finger.Bone ( Bone.BoneType  boneIx)

The bone at a given bone index on this finger.

Since
2.0

Definition at line 79 of file Finger.cs.

◆ ToString()

override string Leap.Finger.ToString ( )

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

Since
1.0

Definition at line 87 of file Finger.cs.

Member Data Documentation

◆ bones

Bone [] Leap.Finger.bones = new Bone[4]

Definition at line 21 of file Finger.cs.

◆ Direction

Vector Leap.Finger.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

Definition at line 129 of file Finger.cs.

◆ HandId

int Leap.Finger.HandId

The Hand associated with a finger.

Since
1.0

Definition at line 116 of file Finger.cs.

◆ Id

int Leap.Finger.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

Definition at line 110 of file Finger.cs.

◆ IsExtended

bool Leap.Finger.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

Definition at line 152 of file Finger.cs.

◆ Length

float Leap.Finger.Length

The estimated length of the finger.

Since
1.0

Definition at line 141 of file Finger.cs.

◆ TimeVisible

float Leap.Finger.TimeVisible

The duration of time this Finger has been visible to the Leap Motion Controller.

Since
1.0

Definition at line 158 of file Finger.cs.

◆ TipPosition

Vector Leap.Finger.TipPosition

The tip position of this Finger.

Since
1.0

Definition at line 122 of file Finger.cs.

◆ Type

Finger.FingerType Leap.Finger.Type

The type of this finger.

Since
2.0

Definition at line 95 of file Finger.cs.

◆ Width

float Leap.Finger.Width

The estimated width of the finger.

Since
1.0

Definition at line 135 of file Finger.cs.


The documentation for this class was generated from the following file: