]> git.tdb.fi Git - r2c2.git/blob - source/3d/view.h
Render a sky in the upper hemisphere of a view's background
[r2c2.git] / source / 3d / view.h
1 #ifndef R2C2_3D_VIEW_H_
2 #define R2C2_3D_VIEW_H_
3
4 #include <msp/gl/camera.h>
5 #include <msp/gl/pipeline.h>
6 #include "sky.h"
7
8 namespace R2C2 {
9
10 class Layout3D;
11
12 class View3D
13 {
14 protected:
15         Layout3D &layout;
16         unsigned width;
17         unsigned height;
18         Msp::GL::Camera camera;
19         Msp::GL::Pipeline pipeline;
20         Sky3D sky;
21
22 public:
23         View3D(Layout3D &, unsigned, unsigned);
24
25         Layout3D &get_layout() const { return layout; }
26         Msp::GL::Camera &get_camera() { return camera; }
27         Msp::GL::Pipeline &get_pipeline() { return pipeline; }
28
29         Ray create_ray(int, int) const;
30         Ray create_ray(float, float) const;
31
32         void view_all(bool = false);
33
34         void render();
35 };
36
37 } // namespace R2C2
38
39 #endif