9using System.Collections;
10using System.Collections.Generic;
21 if (!Application.isPlaying) {
22 frame = TestHandFactory.MakeTestFrame(frameId: 0,
23 includeLeftHand:
true, includeRightHand:
true,
25 unitType: TestHandFactory.UnitType.UnityUnits);
34 if (!Application.isPlaying) {
35 frame = TestHandFactory.MakeTestFrame(frameId: 0,
36 includeLeftHand:
true, includeRightHand:
true,
38 unitType: TestHandFactory.UnitType.UnityUnits);
45 [Header(
"Runtime Basis Transforms")]
47 [Tooltip(
"At runtime, if this Transform is non-null, the LeapTestProvider will "
48 +
"create a test-pose left hand at this transform's position and rotation."
49 +
"Setting this binding to null at runtime will cause the hand to disappear "
50 +
"from Frame data, as if it stopped tracking.")]
52 private Hand _leftHand =
null;
53 private Hand _cachedLeftHand =
null;
55 [Tooltip(
"At runtime, if this Transform is non-null, the LeapTestProvider will "
56 +
"create a test-pose right hand at this transform's position and rotation."
57 +
"Setting this binding to null at runtime will cause the hand to disappear "
58 +
"from Frame data, as if it stopped tracking.")]
60 private Hand _rightHand =
null;
61 private Hand _cachedRightHand =
null;
64 _cachedLeftHand = TestHandFactory.MakeTestHand(isLeft:
true,
65 unitType: TestHandFactory.UnitType.UnityUnits);
66 _cachedLeftHand.
Id = 0;
67 _cachedRightHand = TestHandFactory.MakeTestHand(isLeft:
false,
68 unitType: TestHandFactory.UnitType.UnityUnits);
69 _cachedRightHand.
Id = 1;
74 _leftHand = _cachedLeftHand;
81 if (_leftHand !=
null) {
86 _rightHand = _cachedRightHand;
93 if (_rightHand !=
null) {
The Frame class represents a set of hand and finger tracking data detected in a single frame.
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.
int Id
A unique ID assigned to this Hand object, whose value remains the same across consecutive frames whil...
Provides Frame object data to the Unity application by firing events as soon as Frame data is availab...
void DispatchUpdateFrameEvent(Frame frame)
TestHandPose editTimePose
void DispatchFixedFrameEvent(Frame frame)
override Frame CurrentFrame
override Frame CurrentFixedFrame