X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Fopenvr%2Fopenvrcontroller.h;fp=source%2Fopenvr%2Fopenvrcontroller.h;h=18c5774817e729977e63ad3b0066808ec569c8e0;hp=0000000000000000000000000000000000000000;hb=774cc129d93a0001c36434f47ec0614c653824be;hpb=2acdfcc95c317f30e725e17f0d372fce050830ef diff --git a/source/openvr/openvrcontroller.h b/source/openvr/openvrcontroller.h new file mode 100644 index 0000000..18c5774 --- /dev/null +++ b/source/openvr/openvrcontroller.h @@ -0,0 +1,38 @@ +#ifndef MSP_VR_OPENVRCONTROLLER_H_ +#define MSP_VR_OPENVRCONTROLLER_H_ + +#include + +namespace Msp { +namespace VR { + +class OpenVRSystem; + +class OpenVRController: public MotionController +{ +public: + struct Event; + +private: + OpenVRSystem &system; + int index; + unsigned last_packet_number; + +public: + OpenVRController(OpenVRSystem &); + virtual ~OpenVRController(); + + virtual std::string get_button_name(unsigned) const; + virtual std::string get_axis_name(unsigned) const; + + int get_index() const { return index; } + + void event(const Event &); + virtual void update(); + void update_input_state(); +}; + +} // namespace VR +} // namespace Msp + +#endif