]> git.tdb.fi Git - libs/vr.git/blobdiff - source/motioncontroller.h
Fix memory leaks
[libs/vr.git] / source / motioncontroller.h
index 9cdd6221318bbf84b6c9c75f1e61f25c593d1a14..0dbee9c2b1aea0ce9e365a04fb3e0762121f6335 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_VR_MOTIONCONTROLLER_H_
 
 #include <msp/gl/matrix.h>
+#include <msp/gl/object.h>
 #include <msp/input/device.h>
 
 namespace Msp {
@@ -11,6 +12,9 @@ class StereoView;
 
 class MotionController: public Input::Device
 {
+public:
+       sigc::signal<void, bool> signal_tracking_state_changed;
+
 protected:
        StereoView *view;
        Msp::GL::Matrix matrix;
@@ -21,10 +25,14 @@ public:
 
        void attach_to_view(StereoView &);
        void detach_from_view();
+       virtual bool is_tracked() const = 0;
        const GL::Matrix &get_matrix() const { return matrix; }
        virtual void update() = 0;
 protected:
        void update_from_matrix(const Msp::GL::Matrix &);
+
+public:
+       virtual const GL::Object *get_object() const { return 0; }
 };
 
 } // namespace VR