10using System.Collections;
11using System.Collections.Generic;
34 var leftHand = frame.
Hands.Query().FirstOrDefault(h => h.IsLeft);
35 var rightHand = frame.
Hands.Query().FirstOrDefault(h => !h.IsLeft);
46 public void CompressCurves() {
60 intoFrame.
Hands.Clear();
61 if (leftHandTracked) intoFrame.
Hands.Add(intoLeftHand);
62 if (rightHandTracked) intoFrame.
Hands.Add(intoRightHand);
The Frame class represents a set of hand and finger tracking data detected in a single frame.
long Timestamp
The frame capture time in microseconds elapsed since an arbitrary point in time in the past.
List< Hand > Hands
The list of Hand objects detected in this frame, given in arbitrary order. The list can be empty if n...
The Hand class reports the physical characteristics of a detected hand.
const double S_TO_NS
Converts seconds to nanoseconds. Leap frames store timestamps in nanoseconds.
VectorHand Animation Curve data struct for a Leap frame.
void AddKeyframes(float keyframeTime, Frame frame)
Adds keyframe data from the provided frame to this animation data at the time specified in seconds.
VectorHandCurves rightHandCurves
Hand curve data for the right hand.
void Sample(float time, Frame intoFrame, Hand intoLeftHand, Hand intoRightHand)
Samples the data in these VectorFrameCurves at the specified time into the provided frame.
VectorHandCurves leftHandCurves
Hand curve data for the left hand.
AnimationCurve data for an animated VectorHand representation.
void AddKeyframes(float time, Hand hand)
Adds keyframe data into these VectorHandCurves at the specified time using the provided hand data.
bool Sample(float time, Hand intoHand, bool isLeft)
Samples hand curve data into the provided hand object at the specified time.