Public Member Functions |
def | __eq__ |
def | __init__ |
def | __ne__ |
def | __str__ |
LEAP_EXPORT Arm | arm () const |
LEAP_EXPORT Matrix | basis () const |
LEAP_EXPORT float | confidence () const |
LEAP_EXPORT Vector | direction () const |
def | finger |
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 |
LEAP_EXPORT Pointable | pointable (int32_t id) const |
LEAP_EXPORT PointableList | pointables () const |
def | rotation_angle |
def | rotation_axis |
def | rotation_matrix |
def | rotation_probability |
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 |
def | scale_probability |
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 |
LEAP_EXPORT Tool | tool (int32_t id) const |
LEAP_EXPORT ToolList | tools () const |
std::string | toString () const |
def | translation |
LEAP_EXPORT Vector | translation (const Frame &sinceFrame) const |
def | translation_probability |
LEAP_EXPORT float | translationProbability (const Frame &sinceFrame) const |
LEAP_EXPORT Vector | wristPosition () const |
Static Public Member Functions |
static LEAP_EXPORT const Hand & | invalid () |
Public Attributes |
| this |
Static Public Attributes |
tuple | arm = _swig_property(LeapPython.Hand_arm_get) |
tuple | basis = _swig_property(LeapPython.Hand_basis_get) |
tuple | confidence = _swig_property(LeapPython.Hand_confidence_get) |
tuple | direction = _swig_property(LeapPython.Hand_direction_get) |
tuple | fingers = _swig_property(LeapPython.Hand_fingers_get) |
tuple | frame = _swig_property(LeapPython.Hand_frame_get) |
tuple | grab_strength = _swig_property(LeapPython.Hand_grab_strength_get) |
tuple | id = _swig_property(LeapPython.Hand_id_get) |
tuple | is_left = _swig_property(LeapPython.Hand_is_left_get) |
tuple | is_right = _swig_property(LeapPython.Hand_is_right_get) |
tuple | is_valid = _swig_property(LeapPython.Hand_is_valid_get) |
tuple | palm_normal = _swig_property(LeapPython.Hand_palm_normal_get) |
tuple | palm_position = _swig_property(LeapPython.Hand_palm_position_get) |
tuple | palm_velocity = _swig_property(LeapPython.Hand_palm_velocity_get) |
tuple | palm_width = _swig_property(LeapPython.Hand_palm_width_get) |
tuple | pinch_strength = _swig_property(LeapPython.Hand_pinch_strength_get) |
tuple | pointables = _swig_property(LeapPython.Hand_pointables_get) |
tuple | sphere_center = _swig_property(LeapPython.Hand_sphere_center_get) |
tuple | sphere_radius = _swig_property(LeapPython.Hand_sphere_radius_get) |
tuple | stabilized_palm_position = _swig_property(LeapPython.Hand_stabilized_palm_position_get) |
tuple | time_visible = _swig_property(LeapPython.Hand_time_visible_get) |
tuple | tools = _swig_property(LeapPython.Hand_tools_get) |
tuple | wrist_position = _swig_property(LeapPython.Hand_wrist_position_get) |
Private Member Functions |
LEAP_EXPORT const char * | toCString () const |
Static Private Attributes |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, Hand, name) |
| __repr__ = _swig_repr |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, Hand, name, value) |
| __swig_destroy__ = LeapPython.delete_Hand |
dictionary | __swig_getmethods__ = {} |
dictionary | __swig_setmethods__ = {} |
Friends |
LEAP_EXPORT friend std::ostream & | operator<< (std::ostream &, const Hand &) |
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 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