]> git.tdb.fi Git - r2c2.git/blob - source/3d/view.h
Add View3D class to bundle Layout3D with a camera and a pipeline
[r2c2.git] / source / 3d / view.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2011 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef R2C2_3D_VIEW_H_
9 #define R2C2_3D_VIEW_H_
10
11 #include <msp/gl/camera.h>
12 #include <msp/gl/pipeline.h>
13
14 namespace R2C2 {
15
16 class Layout3D;
17
18 class View3D
19 {
20 protected:
21         Layout3D &layout;
22         Msp::GL::Camera camera;
23         Msp::GL::Pipeline pipeline;
24
25 public:
26         View3D(Layout3D &, unsigned, unsigned);
27
28         Layout3D &get_layout() const { return layout; }
29         Msp::GL::Camera &get_camera() { return camera; }
30         Msp::GL::Pipeline &get_pipeline() { return pipeline; }
31
32         void view_all(bool = false);
33
34         void render();
35 };
36
37 } // namespace R2C2
38
39 #endif