The LeapHand class reports the physical characteristics of a detected hand. More...
Inherits NSObject.
Instance Methods | |
(LeapFinger *) | - finger: |
The LeapFinger object with the specified ID attached to this hand. More... | |
(LeapPointable *) | - pointable: |
The LeapPointable object with the specified ID associated with this hand. More... | |
(float) | - rotationAngle: |
The angle of rotation around the rotation axis derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame. More... | |
(float) | - rotationAngle:axis: |
The angle of rotation around the specified axis derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame. More... | |
(LeapVector *) | - rotationAxis: |
The axis of rotation derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame. More... | |
(LeapMatrix *) | - rotationMatrix: |
The transform matrix expressing the rotation derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame. More... | |
(float) | - rotationProbability: |
The estimated probability that the hand motion between the current LeapFrame and the specified LeapFrame is intended to be a rotating motion. More... | |
(float) | - scaleFactor: |
The scale factor derived from this hand's motion between the current LeapFrame and the specified LeapFrame. More... | |
(float) | - scaleProbability: |
The estimated probability that the hand motion between the current LeapFrame and the specified LeapFrame is intended to be a scaling motion. More... | |
(LeapVector *) | - translation: |
The change of position of this hand between the current LeapFrame and the specified LeapFrame. More... | |
(float) | - translationProbability: |
The estimated probability that the hand motion between the current frame and the specified LeapFrame is intended to be a translating motion. More... | |
Class Methods | |
(LeapHand *) | + invalid |
Returns an invalid LeapHand object. More... | |
Properties | |
LeapArm * | arm |
The arm to which this hand is attached. More... | |
LeapMatrix * | basis |
The orientation of the hand as a basis matrix. More... | |
float | confidence |
Rates how well the internal hand model fits the observed data. More... | |
LeapVector * | direction |
The direction from the palm position toward the fingers. More... | |
NSArray * | fingers |
The list of LeapFinger objects detected in this frame that are attached to this hand, given in arbitrary order. More... | |
LeapFrame * | frame |
The LeapFrame associated with this Hand. More... | |
float | grabAngle |
The angle between the fingers and the hand of a grab hand pose. More... | |
float | grabStrength |
Deprecated. More... | |
int32_t | id |
A unique ID assigned to this LeapHand object, whose value remains the same across consecutive frames while the tracked hand remains visible. More... | |
BOOL | isLeft |
Identifies whether this Hand is a left hand. More... | |
BOOL | isRight |
Identifies whether this Hand is a right hand. More... | |
BOOL | isValid |
Reports whether this is a valid LeapHand object. More... | |
LeapVector * | palmNormal |
The normal vector to the palm. More... | |
LeapVector * | palmPosition |
The center position of the palm in millimeters from the Leap origin. More... | |
LeapVector * | palmVelocity |
The rate of change of the palm position in millimeters/second. More... | |
float | palmWidth |
The estimated width of the palm when the hand is in a flat position. More... | |
float | pinchDistance |
The distance between the thumb and index finger of a pinch hand pose. More... | |
float | pinchStrength |
Deprecated. More... | |
NSArray * | pointables |
The list of LeapPointable objects (fingers) detected in this frame that are associated with this hand, given in arbitrary order. More... | |
LeapVector * | sphereCenter |
The center of a sphere fit to the curvature of this hand. More... | |
float | sphereRadius |
The radius of a sphere fit to the curvature of this hand. More... | |
LeapVector * | stabilizedPalmPosition |
The stabilized tip position of this Pointable. More... | |
float | timeVisible |
The duration of time this Hand has been visible to the Leap Motion Controller. More... | |
The LeapHand 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; properties of a sphere fit to the hand; and lists of the attached fingers.
Note that LeapHand objects can be invalid, which means that they do not contain valid tracking data and do not correspond to a physical entity. Invalid LeapHand objects can be the result of asking for a Hand object using an ID from an earlier frame when no hand objects with that ID exist in the current frame. A hand object created from the LeapHand constructor is also invalid. Test for validity with the LeapHand isValid function.
- (LeapFinger *) finger: | (int32_t) | fingerId |
The LeapFinger object with the specified ID attached to this hand.
Use this [LeapHand finger:] function to retrieve a LeapFinger object attached to this hand using an ID value obtained from a previous frame. This function always returns a LeapFinger object, but if no finger with the specified ID is present, an invalid LeapFinger object is returned.
Note that ID values persist across frames, but only until tracking of a particular object is lost. If tracking of a finger is lost and subsequently regained, the new LeapFinger object representing that finger may have a different ID than that representing the finger in an earlier frame.
fingerId | The ID value of a LeapFinger object from a previous frame. |
+ (LeapHand *) invalid |
- (LeapPointable *) pointable: | (int32_t) | pointableId |
The LeapPointable object with the specified ID associated with this hand.
Use this [LeapHand pointable:] function to retrieve a LeapPointable object associated with this hand using an ID value obtained from a previous frame. This function always returns a LeapPointable object, but if no finger with the specified ID is present, an invalid LeapPointable object is returned.
Note that ID values of fingers are based on the hand ID. Hand IDs persist across frames, but only until tracking of that hand is lost. If tracking of a hand is lost and subsequently regained, the new LeapHand object representing that hand will have a different ID than that representing the hand in an earlier frame. Thus the IDs for the fingers on the hand will also change.
pointableId | The ID value of a LeapPointable object from a previous frame. |
- (float) rotationAngle: | (const LeapFrame *) | sinceFrame |
The angle of rotation around the rotation axis derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame.
sinceFrame | The starting LeapFrame for computing the relative rotation. |
- (float) rotationAngle: | (const LeapFrame *) | sinceFrame | |
axis: | (const LeapVector *) | axis | |
The angle of rotation around the specified axis derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame.
sinceFrame | The starting LeapFrame for computing the relative rotation. |
axis | A LeapVector representing the axis to measure rotation around. |
- (LeapVector *) rotationAxis: | (const LeapFrame *) | sinceFrame |
The axis of rotation derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame.
sinceFrame | The starting LeapFrame for computing the relative rotation. |
- (LeapMatrix *) rotationMatrix: | (const LeapFrame *) | sinceFrame |
The transform matrix expressing the rotation derived from the change in orientation of this hand, and associated fingers, between the current LeapFrame and the specified LeapFrame.
sinceFrame | The starting LeapFrame for computing the relative rotation. |
- (float) rotationProbability: | (const LeapFrame *) | sinceFrame |
The estimated probability that the hand motion between the current LeapFrame and the specified LeapFrame is intended to be a rotating motion.
sinceFrame | The starting LeapFrame for computing the relative rotation. |
- (float) scaleFactor: | (const LeapFrame *) | sinceFrame |
The scale factor derived from this hand's motion between the current LeapFrame and the specified LeapFrame.
sinceFrame | The starting LeapFrame for computing the relative scaling. |
- (float) scaleProbability: | (const LeapFrame *) | sinceFrame |
The estimated probability that the hand motion between the current LeapFrame and the specified LeapFrame is intended to be a scaling motion.
sinceFrame | The starting LeapFrame for computing the relative scaling. |
- (LeapVector *) translation: | (const LeapFrame *) | sinceFrame |
The change of position of this hand between the current LeapFrame and the specified LeapFrame.
sinceFrame | The starting LeapFrame for computing the translation. |
- (float) translationProbability: | (const LeapFrame *) | sinceFrame |
The estimated probability that the hand motion between the current frame and the specified LeapFrame is intended to be a translating motion.
sinceFrame | The starting LeapFrame for computing the translation. |
|
readnonatomicassign |
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.
|
readnonatomicassign |
The orientation of the hand as a basis matrix.
The basis is defined as follows:
xAxis Positive in the direction of the pinky
yAxis Positive above the hand
zAxis Positive in the direction of the wrist
Note: Since the left hand is a mirror of the right hand, the basis matrix uses the left-hand rule for left hands.
|
readnonatomicassign |
Rates how well the internal hand model fits the observed data.
The confidence level ranges between 0.0 and 1.0 inclusive, with 1.0 representing high confidence.
|
readnonatomicassign |
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.
|
readnonatomicassign |
The list of LeapFinger objects detected in this frame that are attached to this hand, given in arbitrary order.
The list can be empty if no fingers attached to this hand are detected.
|
readnonatomicweak |
The LeapFrame associated with this Hand.
This property is a weak reference to the LeapFrame object so it is only valid during the lifetime of the LeapFrame object – while the LeapFrame object is in the history buffer or while your application maintains its own reference.
|
readnonatomicassign |
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.
|
readnonatomicassign |
Deprecated.
Use grabAngle() instead.
|
readnonatomicassign |
A unique ID assigned to this LeapHand 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 field of view), the Leap may assign a new ID when it detects the hand in a future frame.
Use the ID value with the [LeapFrame hand:] function to find this LeapHand object in future frames.
|
readnonatomicassign |
Identifies whether this Hand is a left hand.
|
readnonatomicassign |
Identifies whether this Hand is a right hand.
|
readnonatomicassign |
|
readnonatomicassign |
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).
|
readnonatomicassign |
The center position of the palm in millimeters from the Leap origin.
|
readnonatomicassign |
The rate of change of the palm position in millimeters/second.
|
readnonatomicassign |
The estimated width of the palm when the hand is in a flat position.
|
readnonatomicassign |
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.
|
readnonatomicassign |
Deprecated.
Use pinchDistance() instead.
|
readnonatomicassign |
The list of LeapPointable objects (fingers) detected in this frame that are associated with this hand, given in arbitrary order.
The list will always contain 5 fingers even when some fingers are blocked from view and when the user is missing digits.
|
readnonatomicassign |
The center of a sphere fit to the curvature of this hand.
This sphere is placed roughly as if the hand were holding a ball.
|
readnonatomicassign |
The radius of a sphere fit to the curvature of this hand.
This sphere is placed roughly as if the hand were holding a ball. Thus the size of the sphere decreases as the fingers are curled into a fist.
|
readnonatomicassign |
The stabilized tip position of this Pointable.
Smoothing and stabilization is performed in order to make this value more suitable for interaction with 2D content.
|
readnonatomicassign |
The duration of time this Hand has been visible to the Leap Motion Controller.