Class Leap::Bone¶
- class Leap.Bone : public IEquatable<Bone>¶
The Bone class represents a tracked bone.
All fingers contain 4 bones that make up the anatomy of the finger. Get valid Bone objects from a Finger object.
Bones are ordered from base to tip, indexed from 0 to 3. Additionally, the bone’s Type enum may be used to index a specific bone anatomically.
The thumb does not have a base metacarpal bone and therefore contains a valid, zero length bone at that location.
- Since
2.0
Subclassed by Leap.Arm
Public Types
Public Functions
- Bone (Vector3 prevJoint, Vector3 nextJoint, Vector3 center, Vector3 direction, float length, float width, Bone.BoneType type, Quaternion rotation)
Constructs a new Bone object.
- Since
3.0
Public Members
- Vector3 PrevJoint¶
The base of the bone, closest to the wrist. In anatomical terms, this is the proximal end of the bone.
- Since
2.0
- Vector3 NextJoint¶
The end of the bone, closest to the finger tip. In anatomical terms, this is the distal end of the bone.
- Since
2.0
- float Length¶
The estimated length of the bone.
- Since
2.0
- float Width¶
The average width of the flesh around the bone.
- Since
2.0
- Quaternion Rotation¶
The orientation of this Bone as a Quaternion.
- Since
2.0
Properties
- LeapTransform Basis { get; set; }¶
The orthonormal basis vectors for this Bone as a Matrix. The orientation of this Bone as a Quaternion.
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.
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.
- Since
2.0