--- /dev/null
+#ifndef MSP_VR_MOTIONCONTROLLER_H_
+#define MSP_VR_MOTIONCONTROLLER_H_
+
+#include <msp/gl/matrix.h>
+#include <msp/input/device.h>
+
+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