X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Fmotioncontroller.h;fp=source%2Fmotioncontroller.h;h=9cdd6221318bbf84b6c9c75f1e61f25c593d1a14;hp=0000000000000000000000000000000000000000;hb=774cc129d93a0001c36434f47ec0614c653824be;hpb=2acdfcc95c317f30e725e17f0d372fce050830ef diff --git a/source/motioncontroller.h b/source/motioncontroller.h new file mode 100644 index 0000000..9cdd622 --- /dev/null +++ b/source/motioncontroller.h @@ -0,0 +1,33 @@ +#ifndef MSP_VR_MOTIONCONTROLLER_H_ +#define MSP_VR_MOTIONCONTROLLER_H_ + +#include +#include + +namespace Msp { +namespace VR { + +class StereoView; + +class MotionController: public Input::Device +{ +protected: + StereoView *view; + Msp::GL::Matrix matrix; + + MotionController(); +public: + virtual ~MotionController(); + + void attach_to_view(StereoView &); + void detach_from_view(); + const GL::Matrix &get_matrix() const { return matrix; } + virtual void update() = 0; +protected: + void update_from_matrix(const Msp::GL::Matrix &); +}; + +} // namespace VR +} // namespace Msp + +#endif