Jump to content

leapmotion hand struct


photo

Recommended Posts

palm_position and center is same or Similar?

 

Please also explain the basis. I dont understand about "Orthonormal basis vectors for this Bone as a Matrix."

The hand and bone basis descriptions are the same.

Link to comment

Hi Dongju,

In mathematics, particularly linear algebra, an orthonormal basis for an inner product space V with finite dimension is a basis for V whose vectors are orthonormal, that is, they are all unit vectors and orthogonal to each other.

Basis vectors specify the orientation of a bone.

  • xBasis Perpendicular to the longitudinal axis of the bone; exits the sides of the finger.
  • yBasis or up vector Perpendicular to the longitudinal axis of the bone; exits the top and bottom of the finger. More positive in the upward direction.
  • zBasis Aligned with the longitudinal axis of the bone. More positive toward the base of the finger.

The bases provided for the right hand use the right-hand rule; those for the left hand use the left-hand rule. Thus, the positive direction of the x-basis is to the right for the right hand and to the left for the left hand. You can change from right-hand to left-hand rule by multiplying the z basis vector by -1.

You can use the basis vectors for such purposes as measuring complex finger poses and skeletal animation.

You can get basis vectors from a mat4 matrix using the following:

Unigine::Math::mat4 basis;

Unigine::Math::vec3 xBasisVector = mat4.getAxisX();
Unigine::Math::vec3 yBasisVector = mat4.getAxisY();
Unigine::Math::vec3 zBasisVector = mat4.getAxisZ();

palm_position stores coordinates of the center, instead of "center" in the list of parameters there should be palm_normal - coordinates of the normal vector to the palm. If a hand is flat, this vector will point downward, or “out” of the front surface of your palm. (see the struct in the documentation below).

As for the same basis descriptions for hand and bone, seems like another bug in the documentation. We will fix both, and the updated version will be available with the upcoming SDK release. We're sorry for the inconvenience caused!

The description of the hand's basis should be as follows:

Basis -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

Please note: since the left hand is a mirror of the right hand, the basis matrix will be left-handed for left hands. You can change from right-hand to left-hand rule by multiplying the z basis vector by -1. The same way as described above.

Hope this helps!

Thank you!

Link to comment
×
×
  • Create New...