10using System.Collections;
25 private bool visualizeBasis =
true;
26 public bool VisualizeBasis {
get {
return visualizeBasis; }
set { visualizeBasis = value; } }
37 #pragma warning disable 0649
46 #pragma warning restore 0649
88 for (
int f = 0; f < 5; f++) {
90 for (
int i = 0; i < 4; ++i) {
100 Vector3 origin = position.ToVector3();
101 Debug.DrawLine(origin, origin + basis.
xBasis.ToVector3() * scale,
Color.red);
102 Debug.DrawLine(origin, origin + basis.
yBasis.ToVector3() * scale,
Color.green);
103 Debug.DrawLine(origin, origin + basis.
zBasis.ToVector3() * scale,
Color.blue);
Vector WristPosition
The position of the wrist.
Vector ElbowPosition
The position of the elbow. If not in view, the elbow position is estimated based on typical human ana...
The Bone class represents a tracked bone.
Vector Direction
The normalized direction of the bone from base to tip.
BoneType
Enumerates the type of bones.
LeapTransform Basis
The orthonormal basis vectors for this Bone as a Matrix. The orientation of this Bone as a Quaternion...
Vector PrevJoint
The base of the bone, closest to the wrist. In anatomical terms, this is the proximal end of the bone...
float Length
The estimated length of the bone.
The Finger class represents a tracked finger.
Bone Bone(Bone.BoneType boneIx)
The bone at a given bone index on this finger.
The Hand class reports the physical characteristics of a detected hand.
Vector WristPosition
The position of the wrist of this hand.
float PalmWidth
The estimated width of the palm when the hand is in a flat position.
LeapTransform Basis
The transform of the hand.
Vector PalmNormal
The normal vector to the palm. If your hand is flat, this vector will point downward,...
Arm Arm
The arm to which this hand is attached.
Vector PalmPosition
The center position of the palm.
List< Finger > Fingers
The list of Finger objects detected in this frame that are attached to this hand, given in order from...
override void SetLeapHand(Hand hand)
override Chirality Handedness
override Hand GetLeapHand()
override void UpdateHand()
override ModelType HandModelType
override bool SupportsEditorPersistence()
Returns whether or not this hand model supports editor persistence. This is false by default and must...
void DrawBasis(Vector position, LeapTransform basis, float scale)
The Vector struct represents a three-component mathematical vector or point such as a direction or po...