]> git.tdb.fi Git - r2c2.git/blob - source/3d/view.h
Only use postprocessors that can be supported
[r2c2.git] / source / 3d / view.h
1 #ifndef R2C2_3D_VIEW_H_
2 #define R2C2_3D_VIEW_H_
3
4 #include <msp/gl/ambientocclusion.h>
5 #include <msp/gl/camera.h>
6 #include <msp/gl/colorcurve.h>
7 #include <msp/gl/pipeline.h>
8 #include <msp/gl/shadowmap.h>
9 #include "sky.h"
10
11 namespace R2C2 {
12
13 class Layout3D;
14
15 class View3D: public sigc::trackable
16 {
17 protected:
18         Layout3D &layout;
19         unsigned width;
20         unsigned height;
21         Msp::GL::Camera camera;
22         Msp::GL::Pipeline pipeline;
23         Sky3D sky;
24         Msp::GL::ShadowMap shadow;
25         Msp::GL::ColorCurve *colorcurve;
26         Msp::GL::AmbientOcclusion *ambient_occlusion;
27
28 public:
29         View3D(Layout3D &, unsigned, unsigned);
30         ~View3D();
31
32         Layout3D &get_layout() const { return layout; }
33         Msp::GL::Camera &get_camera() { return camera; }
34         Msp::GL::Pipeline &get_pipeline() { return pipeline; }
35
36         Ray create_ray(int, int) const;
37         Ray create_ray(float, float) const;
38
39 private:
40         void compute_bounds(Vector &, Vector &);
41 public:
42         void view_all(bool = false);
43
44         void render();
45
46 private:
47         void update_shadow_area();
48 };
49
50 } // namespace R2C2
51
52 #endif