Tanoda
Leap.Hand Class Reference

The Hand class reports the physical characteristics of a detected hand. More...

Inheritance diagram for Leap.Hand:

Public Member Functions

 Hand ()
 Constructs a Hand object. More...
 
 Hand (long frameID, int id, float confidence, float grabStrength, float grabAngle, float pinchStrength, float pinchDistance, float palmWidth, bool isLeft, float timeVisible, Arm arm, List< Finger > fingers, Vector palmPosition, Vector stabilizedPalmPosition, Vector palmVelocity, Vector palmNormal, LeapQuaternion palmOrientation, Vector direction, Vector wristPosition)
 Constructs a hand. More...
 
Finger Finger (int id)
 The Finger object with the specified ID attached to this hand. More...
 
bool Equals (Hand other)
 Compare Hand object equality. More...
 
override string ToString ()
 A string containing a brief, human readable description of the Hand object. More...
 

Public Attributes

long FrameId
 
int Id
 A unique ID assigned to this Hand object, whose value remains the same across consecutive frames while the tracked hand remains visible. If tracking is lost (for example, when a hand is occluded by another hand or when it is withdrawn from or reaches the edge of the Leap Motion Controller field of view), the Leap Motion software may assign a new ID when it detects the hand in a future frame. More...
 
List< FingerFingers
 The list of Finger objects detected in this frame that are attached to this hand, given in order from thumb to pinky. The list cannot be empty. More...
 
Vector PalmPosition
 The center position of the palm. More...
 
Vector PalmVelocity
 The rate of change of the palm position. More...
 
Vector PalmNormal
 The normal vector to the palm. If your hand is flat, this vector will point downward, or "out" of the front surface of your palm. More...
 
Vector Direction
 The direction from the palm position toward the fingers. More...
 
LeapQuaternion Rotation
 The rotation of the hand as a quaternion. More...
 
float GrabStrength
 The strength of a grab hand pose. More...
 
float GrabAngle
 The angle between the fingers and the hand of a grab hand pose. More...
 
float PinchStrength
 The holding strength of a pinch hand pose. More...
 
float PinchDistance
 The distance between the thumb and index finger of a pinch hand pose. More...
 
float PalmWidth
 The estimated width of the palm when the hand is in a flat position. More...
 
Vector StabilizedPalmPosition
 The stabilized palm position of this Hand. More...
 
Vector WristPosition
 The position of the wrist of this hand. More...
 
float TimeVisible
 The duration of time this Hand has been visible to the Leap Motion Controller. More...
 
float Confidence
 How confident we are with a given hand pose. The confidence level ranges between 0.0 and 1.0 inclusive. More...
 
bool IsLeft
 Identifies whether this Hand is a left hand. More...
 
Arm Arm
 The arm to which this hand is attached. More...
 

Properties

LeapTransform Basis [get]
 The transform of the hand. More...
 
bool IsRight [get]
 Identifies whether this Hand is a right hand. More...
 

Detailed Description

The Hand class reports the physical characteristics of a detected hand.

Hand tracking data includes a palm position and velocity; vectors for the palm normal and direction to the fingers; and lists of the attached fingers.

Note that Hand objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical entity. Invalid Hand objects can be the result of using the default constructor, or modifying the hand data in an incorrect way.

Since
1.0

Definition at line 26 of file Hand.cs.

Constructor & Destructor Documentation

◆ Hand() [1/2]

Leap.Hand.Hand ( )

Constructs a Hand object.

An uninitialized hand is considered invalid. Get valid Hand objects from a Frame object.

Since
1.0

Definition at line 36 of file Hand.cs.

◆ Hand() [2/2]

Leap.Hand.Hand ( long  frameID,
int  id,
float  confidence,
float  grabStrength,
float  grabAngle,
float  pinchStrength,
float  pinchDistance,
float  palmWidth,
bool  isLeft,
float  timeVisible,
Arm  arm,
List< Finger fingers,
Vector  palmPosition,
Vector  stabilizedPalmPosition,
Vector  palmVelocity,
Vector  palmNormal,
LeapQuaternion  palmOrientation,
Vector  direction,
Vector  wristPosition 
)

Constructs a hand.

Generally, you should not create your own Hand objects. Such objects will not have valid tracking data. Get valid Hand objects from a frame received from the service.

Since
3.0

Definition at line 54 of file Hand.cs.

Member Function Documentation

◆ Equals()

bool Leap.Hand.Equals ( Hand  other)

Compare Hand object equality.

Two Hand objects are equal if and only if both Hand objects represent the exact same physical hand in the same frame and both Hand objects are valid.

Definition at line 122 of file Hand.cs.

◆ Finger()

Finger Leap.Hand.Finger ( int  id)

The Finger object with the specified ID attached to this hand.

Use the Hand.Finger() function to retrieve a Finger object attached to this hand using an ID value obtained from a previous frame.

Note that ID values persist across frames, but only until tracking of a particular object is lost. If tracking of a hand is lost and subsequently regained, the new Finger object representing that finger may have a different ID than that representing the finger in an earlier frame.

Since
1.0

Definition at line 107 of file Hand.cs.

◆ ToString()

override string Leap.Hand.ToString ( )

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

Since
1.0

Definition at line 130 of file Hand.cs.

Member Data Documentation

◆ Arm

Arm Leap.Hand.Arm

The arm to which this hand is attached.

If the arm is not completely in view, Arm attributes are estimated based on the attributes of entities that are in view combined with typical human anatomy.

Since
2.0.3

Definition at line 311 of file Hand.cs.

◆ Confidence

float Leap.Hand.Confidence

How confident we are with a given hand pose. The confidence level ranges between 0.0 and 1.0 inclusive.

Since
2.0

Definition at line 290 of file Hand.cs.

◆ Direction

Vector Leap.Hand.Direction

The direction from the palm position toward the fingers.

The direction is expressed as a unit vector pointing in the same direction as the directed line from the palm position to the fingers.

You can use the palm direction vector to compute the pitch and yaw angles of the palm with respect to the horizontal plane.

Since
1.0

Definition at line 196 of file Hand.cs.

◆ Fingers

List<Finger> Leap.Hand.Fingers

The list of Finger objects detected in this frame that are attached to this hand, given in order from thumb to pinky. The list cannot be empty.

Since
1.0

Definition at line 159 of file Hand.cs.

◆ FrameId

long Leap.Hand.FrameId

Definition at line 138 of file Hand.cs.

◆ GrabAngle

float Leap.Hand.GrabAngle

The angle between the fingers and the hand of a grab hand pose.

The angle is computed by looking at the angle between the direction of the 4 fingers and the direction of the hand. Thumb is not considered when computing the angle. The angle is 0 radian for an open hand, and reaches pi radians when the pose is a tight fist.

Since
3.0

Definition at line 233 of file Hand.cs.

◆ GrabStrength

float Leap.Hand.GrabStrength

The strength of a grab hand pose.

The strength is zero for an open hand, and blends to one when a grabbing hand pose is recognized.

Since
2.0

Definition at line 220 of file Hand.cs.

◆ Id

int Leap.Hand.Id

A unique ID assigned to this Hand object, whose value remains the same across consecutive frames while the tracked hand remains visible. If tracking is lost (for example, when a hand is occluded by another hand or when it is withdrawn from or reaches the edge of the Leap Motion Controller field of view), the Leap Motion software may assign a new ID when it detects the hand in a future frame.

Use the ID value with the Frame.Hand() function to find this Hand object in future frames.

Since
1.0

Definition at line 152 of file Hand.cs.

◆ IsLeft

bool Leap.Hand.IsLeft

Identifies whether this Hand is a left hand.

Since
2.0

Definition at line 296 of file Hand.cs.

◆ PalmNormal

Vector Leap.Hand.PalmNormal

The normal vector to the palm. If your hand is flat, this vector will point downward, or "out" of the front surface of your palm.

The direction is expressed as a unit vector pointing in the same direction as the palm normal (that is, a vector orthogonal to the palm).

You can use the palm normal vector to compute the roll angle of the palm with respect to the horizontal plane.

Since
1.0

Definition at line 184 of file Hand.cs.

◆ PalmPosition

Vector Leap.Hand.PalmPosition

The center position of the palm.

Since
1.0

Definition at line 165 of file Hand.cs.

◆ PalmVelocity

Vector Leap.Hand.PalmVelocity

The rate of change of the palm position.

Since
1.0

Definition at line 171 of file Hand.cs.

◆ PalmWidth

float Leap.Hand.PalmWidth

The estimated width of the palm when the hand is in a flat position.

Since
2.0

Definition at line 259 of file Hand.cs.

◆ PinchDistance

float Leap.Hand.PinchDistance

The distance between the thumb and index finger of a pinch hand pose.

The distance is computed by looking at the shortest distance between the last 2 phalanges of the thumb and those of the index finger. This pinch measurement only takes thumb and index finger into account.

Since
3.0

Definition at line 253 of file Hand.cs.

◆ PinchStrength

float Leap.Hand.PinchStrength

The holding strength of a pinch hand pose.

The strength is zero for an open hand, and blends to one when a pinching hand pose is recognized. Pinching can be done between the thumb and any other finger of the same hand.

Since
2.0

Definition at line 243 of file Hand.cs.

◆ Rotation

LeapQuaternion Leap.Hand.Rotation

The rotation of the hand as a quaternion.

Since
3.1

Definition at line 211 of file Hand.cs.

◆ StabilizedPalmPosition

Vector Leap.Hand.StabilizedPalmPosition

The stabilized palm position of this Hand.

Smoothing and stabilization is performed in order to make this value more suitable for interaction with 2D content. The stabilized position lags behind the palm position by a variable amount, depending primarily on the speed of movement.

Since
1.0

Definition at line 270 of file Hand.cs.

◆ TimeVisible

float Leap.Hand.TimeVisible

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

Since
1.0

Definition at line 282 of file Hand.cs.

◆ WristPosition

Vector Leap.Hand.WristPosition

The position of the wrist of this hand.

Since
2.0.3

Definition at line 276 of file Hand.cs.

Property Documentation

◆ Basis

LeapTransform Leap.Hand.Basis
get

The transform of the hand.

Note, in version prior to 3.1, the Basis was a Matrix object.

Since
3.1

Definition at line 204 of file Hand.cs.

◆ IsRight

bool Leap.Hand.IsRight
get

Identifies whether this Hand is a right hand.

Since
2.0

Definition at line 302 of file Hand.cs.


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