]> git.tdb.fi Git - libs/vr.git/blobdiff - source/stereocombiner.h
Move some common calculations to base classes
[libs/vr.git] / source / stereocombiner.h
index 5439aeba673da3a0d46de75a60e1445995e2dd7a..bef0849b39ee4a460d8c8c838957286f70dc4fa9 100644 (file)
@@ -10,6 +10,17 @@ namespace VR {
 class StereoCombiner
 {
 protected:
+       struct Frustum
+       {
+               float left;
+               float right;
+               float bottom;
+               float top;
+
+               Frustum();
+               Frustum(float, float, float, float);
+       };
+
        unsigned target_width;
        unsigned target_height;
        float render_aspect;
@@ -20,6 +31,9 @@ protected:
 public:
        virtual ~StereoCombiner() { }
 
+protected:
+       void configure_eye_frustums(const Frustum &, const Frustum &);
+public:
        float get_target_width() const { return target_width; }
        float get_target_height() const { return target_height; }
        float get_render_aspect() const { return render_aspect; }