]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/view.h
Make View3D trackable since it connects to a signal
[r2c2.git] / source / 3d / view.h
index f18f0a1f6a8bc95201f5dd9fbbcef339b09cc4ce..5be2d8c0adf383bf56714e113845b96006270de9 100644 (file)
@@ -1,26 +1,29 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2011 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef R2C2_3D_VIEW_H_
 #define R2C2_3D_VIEW_H_
 
+#include <msp/gl/ambientocclusion.h>
 #include <msp/gl/camera.h>
+#include <msp/gl/colorcurve.h>
 #include <msp/gl/pipeline.h>
+#include <msp/gl/shadowmap.h>
+#include "sky.h"
 
 namespace R2C2 {
 
 class Layout3D;
 
-class View3D
+class View3D: public sigc::trackable
 {
 protected:
        Layout3D &layout;
+       unsigned width;
+       unsigned height;
        Msp::GL::Camera camera;
        Msp::GL::Pipeline pipeline;
+       Sky3D sky;
+       Msp::GL::ShadowMap shadow;
+       Msp::GL::ColorCurve colorcurve;
+       Msp::GL::AmbientOcclusion ambient_occlusion;
 
 public:
        View3D(Layout3D &, unsigned, unsigned);
@@ -29,9 +32,18 @@ public:
        Msp::GL::Camera &get_camera() { return camera; }
        Msp::GL::Pipeline &get_pipeline() { return pipeline; }
 
+       Ray create_ray(int, int) const;
+       Ray create_ray(float, float) const;
+
+private:
+       void compute_bounds(Vector &, Vector &);
+public:
        void view_all(bool = false);
 
        void render();
+
+private:
+       void update_shadow_area();
 };
 
 } // namespace R2C2