|
def | __eq__ (self, arg2) |
|
def | __init__ (self) |
|
def | __ne__ (self, arg2) |
|
def | __str__ (self) |
|
LEAP_EXPORT Arm | arm () const |
|
LEAP_EXPORT Matrix | basis () const |
|
LEAP_EXPORT float | confidence () const |
|
LEAP_EXPORT Vector | direction () const |
|
def | finger (self, id) |
|
LEAP_EXPORT Finger | finger (int32_t id) const |
|
LEAP_EXPORT FingerList | fingers () const |
|
LEAP_EXPORT Frame | frame () const |
|
LEAP_EXPORT float | grabStrength () const |
|
| Hand (HandImplementation *) |
|
LEAP_EXPORT | Hand () |
|
LEAP_EXPORT int32_t | id () const |
|
LEAP_EXPORT bool | isLeft () const |
|
LEAP_EXPORT bool | isRight () const |
|
LEAP_EXPORT bool | isValid () const |
|
LEAP_EXPORT bool | operator!= (const Hand &) const |
|
LEAP_EXPORT bool | operator== (const Hand &) const |
|
LEAP_EXPORT Vector | palmNormal () const |
|
LEAP_EXPORT Vector | palmPosition () const |
|
LEAP_EXPORT Vector | palmVelocity () const |
|
LEAP_EXPORT float | palmWidth () const |
|
LEAP_EXPORT float | pinchStrength () const |
|
def | pointable (self, id) |
|
LEAP_EXPORT Pointable | pointable (int32_t id) const |
|
LEAP_EXPORT PointableList | pointables () const |
|
def | rotation_angle (self, args) |
|
def | rotation_axis (self, sinceFrame) |
|
def | rotation_matrix (self, sinceFrame) |
|
def | rotation_probability (self, sinceFrame) |
|
LEAP_EXPORT float | rotationAngle (const Frame &sinceFrame) const |
|
LEAP_EXPORT float | rotationAngle (const Frame &sinceFrame, const Vector &axis) const |
|
LEAP_EXPORT Vector | rotationAxis (const Frame &sinceFrame) const |
|
LEAP_EXPORT Matrix | rotationMatrix (const Frame &sinceFrame) const |
|
LEAP_EXPORT float | rotationProbability (const Frame &sinceFrame) const |
|
def | scale_factor (self, sinceFrame) |
|
def | scale_probability (self, sinceFrame) |
|
LEAP_EXPORT float | scaleFactor (const Frame &sinceFrame) const |
|
LEAP_EXPORT float | scaleProbability (const Frame &sinceFrame) const |
|
LEAP_EXPORT Vector | sphereCenter () const |
|
LEAP_EXPORT float | sphereRadius () const |
|
LEAP_EXPORT Vector | stabilizedPalmPosition () const |
|
LEAP_EXPORT float | timeVisible () const |
|
def | tool (self, id) |
|
LEAP_EXPORT Tool | tool (int32_t id) const |
|
LEAP_EXPORT ToolList | tools () const |
|
std::string | toString () const |
|
def | translation (self, sinceFrame) |
|
LEAP_EXPORT Vector | translation (const Frame &sinceFrame) const |
|
def | translation_probability (self, sinceFrame) |
|
LEAP_EXPORT float | translationProbability (const Frame &sinceFrame) const |
|
LEAP_EXPORT Vector | wristPosition () const |
|
def | __init__ (self, args, kwargs) |
|
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; properties of a sphere fit to the hand; and lists of the attached fingers.
Get Hand objects from a Frame object:
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 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 Hand constructor is also invalid. Test for validity with the Hand::isValid() function.
- Since
- 1.0
Definition at line 1096 of file Leap.h.
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 will be left-handed for left hands.
- Returns
- The basis of the hand as a matrix.
- Since
- 2.0
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. This function always returns a Finger object, but if no finger with the specified ID is present, an invalid Finger 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 Finger object representing that finger may have a different ID than that representing the finger in an earlier frame.
- Parameters
-
id | The ID value of a Finger object from a previous frame. |
- Returns
- The Finger object with the matching ID if one exists for this hand in this frame; otherwise, an invalid Finger object is returned.
- Since
- 1.0
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:
- Returns
- The Vector normal to the plane formed by the palm.
- Since
- 1.0
The Pointable object with the specified ID associated with this hand.
Use the Hand::pointable() function to retrieve a Pointable object associated with this hand using an ID value obtained from a previous frame. This function always returns a Pointable object, but if no finger with the specified ID is present, an invalid Pointable object is returned.
Note that the ID values assigned to fingers are based on the hand ID. Hand IDs persist across frames, but only until tracking of that hand is lost. If tracking of the hand is lost and subsequently regained, the new Hand object and its child Finger objects will have a different ID than in an earlier frame.
- Parameters
-
id | The ID value of a Pointable object from a previous frame. |
- Returns
- The Pointable object with the matching ID if one exists for this hand in this frame; otherwise, an invalid Pointable object is returned.
- Since
- 1.0
The angle of rotation around the rotation axis derived from the change in orientation of this hand, and any associated fingers, between the current frame and the specified frame.
The returned angle is expressed in radians measured clockwise around the rotation axis (using the right-hand rule) between the start and end frames. The value is always between 0 and pi radians (0 and 180 degrees).
If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame are invalid Frame objects, then the angle of rotation is zero.
- Parameters
-
sinceFrame | The starting frame for computing the relative rotation. |
- Returns
- A positive value representing the heuristically determined rotational change of the hand between the current frame and that specified in the sinceFrame parameter.
- Since
- 1.0
The angle of rotation around the specified axis derived from the change in orientation of this hand, and any associated fingers, between the current frame and the specified frame.
The returned angle is expressed in radians measured clockwise around the rotation axis (using the right-hand rule) between the start and end frames. The value is always between -pi and pi radians (-180 and 180 degrees).
If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame are invalid Frame objects, then the angle of rotation is zero.
- Parameters
-
sinceFrame | The starting frame for computing the relative rotation. |
axis | The axis to measure rotation around. |
- Returns
- A value representing the heuristically determined rotational change of the hand between the current frame and that specified in the sinceFrame parameter around the specified axis.
- Since
- 1.0
The axis of rotation derived from the change in orientation of this hand, and any associated fingers, between the current frame and the specified frame.
The returned direction vector is normalized.
If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame are invalid Frame objects, then this method returns a zero vector.
- Parameters
-
sinceFrame | The starting frame for computing the relative rotation. |
- Returns
- A normalized direction Vector representing the heuristically determined axis of rotational change of the hand between the current frame and that specified in the sinceFrame parameter.
- Since
- 1.0
The transform matrix expressing the rotation derived from the change in orientation of this hand, and any associated fingers, between the current frame and the specified frame.
If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame are invalid Frame objects, then this method returns an identity matrix.
- Parameters
-
sinceFrame | The starting frame for computing the relative rotation. |
- Returns
- A transformation Matrix representing the heuristically determined rotational change of the hand between the current frame and that specified in the sinceFrame parameter.
- Since
- 1.0
The scale factor derived from this hand's motion between the current frame and the specified frame.
The scale factor is always positive. A value of 1.0 indicates no scaling took place. Values between 0.0 and 1.0 indicate contraction and values greater than 1.0 indicate expansion.
The Leap Motion software derives scaling from the relative inward or outward motion of a hand and its associated fingers (independent of translation and rotation).
If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame are invalid Frame objects, then this method returns 1.0.
- Parameters
-
sinceFrame | The starting frame for computing the relative scaling. |
- Returns
- A positive value representing the heuristically determined scaling change ratio of the hand between the current frame and that specified in the sinceFrame parameter.
- Since
- 1.0
The change of position of this hand between the current frame and the specified frame.
The returned translation vector provides the magnitude and direction of the movement in millimeters.
If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame are invalid Frame objects, then this method returns a zero vector.
- Parameters
-
sinceFrame | The starting frame for computing the translation. |
- Returns
- A Vector representing the heuristically determined change in hand position between the current frame and that specified in the sinceFrame parameter.
- Since
- 1.0