-
Notifications
You must be signed in to change notification settings - Fork 1
/
VirtualMotionData.h
40 lines (28 loc) · 1.07 KB
/
VirtualMotionData.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
#if !defined(__VirtualMotionData_h__)
#define __VirtualMotionData_h__
#include "libvml.h"
#include <vector>
namespace OSVRVirtualMotion {
class VirtualMotionData {
public:
VirtualMotionData(const std::vector<VML_GLOVE*>& gloves);
void update();
const VML_GLOVE* getLeftGlove() const;
const VML_GLOVE* getRightGlove() const;
const VML_GLOVE_SAMPLE* getLeftGloveSample() const;
const VML_GLOVE_SAMPLE* getRightGloveSample() const;
const VML_GLOVE* getGlove(uint32 gloveIndex) const;
const VML_GLOVE_SAMPLE* getSample(uint32 gloveIndex) const;
bool hasLeftGlove() const;
bool hasRightGlove() const;
int getLeftGloveIndex() const;
int getRightGloveIndex() const;
private:
std::vector<VML_GLOVE*> mGloves;
// do not make vml calls on this instance directly,
// use getSample() to preserve its original const-ness
std::vector<VML_GLOVE_SAMPLE*> mSamples;
int getGloveIndex(VML_GLOVE_HAND hand) const;
};
}
#endif //__VirtualMotionData_h__