Add interfaces for dealing with VR headsets
authorMikko Rasa <tdb@tdb.fi>
Sun, 15 Sep 2013 12:40:41 +0000 (15:40 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 15 Sep 2013 12:40:41 +0000 (15:40 +0300)
source/displaydevice.h [new file with mode: 0644]
source/headtrackingcamera.h [new file with mode: 0644]

diff --git a/source/displaydevice.h b/source/displaydevice.h
new file mode 100644 (file)
index 0000000..8bd960d
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef MSP_VR_DISPLAYDEVICE_H_
+#define MSP_VR_DISPLAYDEVICE_H_
+
+#include <msp/gl/camera.h>
+
+namespace Msp {
+namespace VR {
+
+class HeadTrackingCamera;
+class StereoCombiner;
+
+class DisplayDevice
+{
+protected:
+       DisplayDevice() { }
+public:
+       virtual ~DisplayDevice() { }
+
+       virtual HeadTrackingCamera *create_camera(const GL::Camera &) const = 0;
+       virtual StereoCombiner *create_combiner() const = 0;
+};
+
+} // namespace VR
+} // namespace Msp
+
+#endif
diff --git a/source/headtrackingcamera.h b/source/headtrackingcamera.h
new file mode 100644 (file)
index 0000000..b12a929
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef MSP_VR_HEADTRACKINGCAMERA_H_
+#define MSP_VR_HEADTRACKINGCAMERA_H_
+
+#include <msp/gl/camera.h>
+
+namespace Msp {
+namespace VR {
+
+class HeadTrackingCamera: public Msp::GL::Camera
+{
+protected:
+       HeadTrackingCamera() { }
+
+public:
+       virtual ~HeadTrackingCamera() { }
+
+       virtual void update() = 0;
+};
+
+} // namespace VR
+} // namespace Msp
+
+#endif