-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathAnalog.h
42 lines (32 loc) · 908 Bytes
/
Analog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <osvr/PluginKit/PluginKit.h>
#include <osvr/PluginKit/AnalogInterfaceC.h>
#include "LeapData.h"
namespace LeapOsvr {
class Analog {
public:
Analog(const osvr::pluginkit::DeviceToken& pDeviceToken,
OSVR_DeviceInitOptions pOptions, const LeapData& pLeapData);
void update();
private:
enum Channel {
IsDeviceConnected,
IsServiceConnected,
IsLeftHandAvailable,
IsRightHandAvailable,
LeftHandConfidence,
RightHandConfidence,
LeftHandGrabStrength,
RightHandGrabStrength,
LeftHandPinchStrength,
RightHandPinchStrength,
LeftHandPalmWidth,
RightHandPalmWidth,
AnalogChannelCount //must be the last element
};
const LeapData& mLeapData;
const osvr::pluginkit::DeviceToken& mDeviceToken;
OSVR_AnalogDeviceInterface mAnalogInterface;
OSVR_AnalogState mValues[AnalogChannelCount];
const LEAP_HAND mNullHand;
};
}