# LeapArmΒΆ

LeapArm Class Reference

The LeapArm class represents the forearm attached to a tracked hand. More...

Inherits NSObject.

## Properties

LeapMatrixbasis
The orthonormal basis vectors for the LeapArm bone as a Matrix. More...

LeapVectorcenter
The center of the forearm. More...

LeapVectordirection
The normalized direction in which the arm is pointing (from elbow to wrist). More...

LeapVectorelbowPosition
The position of the elbow. More...

LeapArminvalid
An invalid LeapArm object. More...

BOOL isValid
Reports whether this is a valid LeapArm object. More...

float width
The average width of the arm. More...

LeapVectorwristPosition
The position of the wrist. More...

## Detailed Description

The LeapArm class represents the forearm attached to a tracked hand.

Since 2.1.2

## Property Documentation

 - (LeapMatrix*) basis

The orthonormal basis vectors for the LeapArm bone as a Matrix.

Basis vectors specify the orientation of a bone.

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

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

zBasis Aligned with the longitudinal axis of the arm bone. More positive toward the wrist.

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.

Returns
The basis of the arm bone as a matrix.
Since
2.1.2
 - (LeapVector*) center

The center of the forearm.

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

Since
2.1.2
 - (LeapVector*) direction

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

Since
2.1.2
 - (LeapVector*) elbowPosition

The position of the elbow.

If not in view, the elbow position is estimated based on typical human anatomical proportions.

Since
2.1.2
 - (LeapArm*) invalid

An invalid LeapArm object.

You can use an invalid LeapArm object in comparisons testing whether a given LeapArm instance is valid or invalid. (You can also use the LeapArm.isValid property.)

Returns
The invalid Arm instance.
Since
2.1.2
 - (BOOL) isValid

Reports whether this is a valid LeapArm object.

Since
2.1.2
 - (float) width

The average width of the arm.

Since
2.1.2
 - (LeapVector*) wristPosition