Tanoda
StationaryTestLeapProvider.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9namespace Leap.Unity {
10
12
13 private Frame _curFrame;
14
15 private Hand _leftHand;
16 private Hand _rightHand;
17
18 public override Frame CurrentFrame {
19 get {
20 return _curFrame;
21 }
22 }
23
24 public override Frame CurrentFixedFrame {
25 get {
26 return _curFrame;
27 }
28 }
29
30 void Awake() {
31 refreshFrame();
32 }
33
34 private void refreshFrame() {
35 _curFrame = new Frame();
36
37 _leftHand = this.MakeTestHand(true);
38 _rightHand = this.MakeTestHand(false);
39
40 _curFrame.Hands.Add(_leftHand);
41 _curFrame.Hands.Add(_rightHand);
42 }
43
44 void Update() {
45 refreshFrame();
46
47 DispatchUpdateFrameEvent(_curFrame);
48 }
49
50 void FixedUpdate() {
51 DispatchFixedFrameEvent(_curFrame);
52 }
53
54 }
55
56}
The Frame class represents a set of hand and finger tracking data detected in a single frame.
Definition: Frame.cs:24
List< Hand > Hands
The list of Hand objects detected in this frame, given in arbitrary order. The list can be empty if n...
Definition: Frame.cs:156
The Hand class reports the physical characteristics of a detected hand.
Definition: Hand.cs:26
Provides Frame object data to the Unity application by firing events as soon as Frame data is availab...
Definition: LeapProvider.cs:21
void DispatchUpdateFrameEvent(Frame frame)
Definition: LeapProvider.cs:49
void DispatchFixedFrameEvent(Frame frame)
Definition: LeapProvider.cs:58