]> git.tdb.fi Git - libs/vr.git/blob - source/openvr/openvrcontroller.h
18c5774817e729977e63ad3b0066808ec569c8e0
[libs/vr.git] / source / openvr / openvrcontroller.h
1 #ifndef MSP_VR_OPENVRCONTROLLER_H_
2 #define MSP_VR_OPENVRCONTROLLER_H_
3
4 #include <msp/vr/motioncontroller.h>
5
6 namespace Msp {
7 namespace VR {
8
9 class OpenVRSystem;
10
11 class OpenVRController: public MotionController
12 {
13 public:
14         struct Event;
15
16 private:
17         OpenVRSystem &system;
18         int index;
19         unsigned last_packet_number;
20
21 public:
22         OpenVRController(OpenVRSystem &);
23         virtual ~OpenVRController();
24
25         virtual std::string get_button_name(unsigned) const;
26         virtual std::string get_axis_name(unsigned) const;
27
28         int get_index() const { return index; }
29
30         void event(const Event &);
31         virtual void update();
32         void update_input_state();
33 };
34
35 } // namespace VR
36 } // namespace Msp
37
38 #endif