**Methods:**

The

Armclass represents the forearm.Public FunctionsArm()Matrixbasis()The orthonormal basis vectors for the

Armbone as aMatrix.Basis vectors specify the orientation of a bone.

xBasisPerpendicular to the longitudinal axis of the bone; exits the arm laterally through the sides of the wrist.

yBasis or up vectorPerpendicular to the longitudinal axis of the bone; exits the top and bottom of the arm. More positive in the upward direction.

zBasisAligned with the longitudinal axis of the arm bone. More positive toward the wrist.Leap::Matrixbasis= arm.basis();Leap::VectorxBasis = basis.xBasis;Leap::VectoryBasis = basis.yBasis;Leap::VectorzBasis = basis.zBasis;Leap::VectorarmCenter = arm.elbowPosition() + (arm.wristPosition() - arm.elbowPosition()) * .5;Leap::Matrixtransform =Leap::Matrix(xBasis, yBasis, zBasis, armCenter);The bases provided for the right arm use the right-hand rule; those for the left arm use the left-hand rule. Thus, the positive direction of the x-basis is to the right for the right arm and to the left for the left arm. You can change from right-hand to left-hand rule by multiplying the z basis vector by -1.

Note that converting the basis vectors directly into a quaternion representation is not mathematically valid. If you use quaternions, create them from the derived rotation matrix not directly from the bases.

Return- The basis of the arm bone as a matrix.
Since- 2.0.3
Vectorcenter()The center of the forearm.

This location represents the midpoint of the arm between the wrist position and the elbow position.

Since- 2.1.0
Vectordirection()The normalized direction in which the arm is pointing (from elbow to wrist).

Leap::Vectordirection= arm.direction();

Since- 2.0.3
VectorelbowPosition()The position of the elbow.

Leap::Vectorelbow = arm.elbowPosition();If not in view, the elbow position is estimated based on typical human anatomical proportions.

Since- 2.0.3
boolisValid()booloperator!=(constArm&)booloperator==(constArm&)std::stringtoString()floatwidth()VectorwristPosition()The position of the wrist.

Leap::Vectorwrist = arm.wristPosition();Note that the wrist position is not collocated with the end of any bone in the hand. There is a gap of a few centimeters since the carpal bones are not included in the skeleton model.

Since- 2.0.3
Public Static FunctionsconstArm&invalid()Returns an invalid

Armobject.Leap::Armarm =Leap::Arm::invalid();

Return- The invalid
Arminstance.Since- 2.0.3