19 private AnimationCurve _backingIsTrackedCurve;
23 if (_backingIsTrackedCurve ==
null) {
24 _backingIsTrackedCurve =
new AnimationCurve();
26 return _backingIsTrackedCurve;
29 _backingIsTrackedCurve = value;
44 if (_backingJointPositionCurves ==
null) {
46 for (
int i = 0; i < _backingJointPositionCurves.Length; i++) {
50 return _backingJointPositionCurves;
53 _backingJointPositionCurves = value;
60 private Hand _lastHand;
67 bool isTracked = hand !=
null;
72 VectorHand vectorHand = Pool<VectorHand>.Spawn();
84 Pool<VectorHand>.Recycle(vectorHand);
93 public void Compress() {
114 VectorHand vectorHand = Pool<VectorHand>.Spawn();
116 vectorHand.
isLeft = isLeft;
124 vectorHand.
Decode(intoHand);
127 if (_lastHand !=
null) {
128 intoHand.FillTemporalData(_lastHand, Time.deltaTime);
130 _lastHand.CopyFrom(intoHand);
133 _lastHand =
new Hand();
137 Pool<VectorHand>.Recycle(vectorHand);
The Hand class reports the physical characteristics of a detected hand.
A Vector-based encoding of a Leap Hand.
void Encode(Hand fromHand)
void Decode(Hand intoHand)
const int NUM_JOINT_POSITIONS
AnimationCurve data for an animated Quaternion.
void AddKeyframes(float time, Quaternion value)
Quaternion Evaluate(float time)
AnimationCurve data for an animated Vector3.
void AddKeyframes(float time, Vector3 value)
Vector3 Evaluate(float time)
AnimationCurve data for an animated VectorHand representation.
Vector3Curves palmPosCurves
AnimationCurve data for palm position.
void AddKeyframes(float time, Hand hand)
Adds keyframe data into these VectorHandCurves at the specified time using the provided hand data.
AnimationCurve isTrackedCurve
AnimationCurve for whether the hand is tracked.
Vector3Curves[] jointPositionCurves
AnimationCurve data for the hand's fingers.
bool Sample(float time, Hand intoHand, bool isLeft)
Samples hand curve data into the provided hand object at the specified time.
QuaternionCurves palmRotCurves
AnimationCurve data for palm rotation.