From 8e2e8257d569fd9a626bdb2a4a0e8767f3b3be12 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 15 Sep 2013 15:40:41 +0300 Subject: [PATCH] Add interfaces for dealing with VR headsets --- source/displaydevice.h | 26 ++++++++++++++++++++++++++ source/headtrackingcamera.h | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 source/displaydevice.h create mode 100644 source/headtrackingcamera.h diff --git a/source/displaydevice.h b/source/displaydevice.h new file mode 100644 index 0000000..8bd960d --- /dev/null +++ b/source/displaydevice.h @@ -0,0 +1,26 @@ +#ifndef MSP_VR_DISPLAYDEVICE_H_ +#define MSP_VR_DISPLAYDEVICE_H_ + +#include + +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 index 0000000..b12a929 --- /dev/null +++ b/source/headtrackingcamera.h @@ -0,0 +1,23 @@ +#ifndef MSP_VR_HEADTRACKINGCAMERA_H_ +#define MSP_VR_HEADTRACKINGCAMERA_H_ + +#include + +namespace Msp { +namespace VR { + +class HeadTrackingCamera: public Msp::GL::Camera +{ +protected: + HeadTrackingCamera() { } + +public: + virtual ~HeadTrackingCamera() { } + + virtual void update() = 0; +}; + +} // namespace VR +} // namespace Msp + +#endif -- 2.45.2