]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/view.h
Add View3D class to bundle Layout3D with a camera and a pipeline
[r2c2.git] / source / 3d / view.h
diff --git a/source/3d/view.h b/source/3d/view.h
new file mode 100644 (file)
index 0000000..f18f0a1
--- /dev/null
@@ -0,0 +1,39 @@
+/* $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/camera.h>
+#include <msp/gl/pipeline.h>
+
+namespace R2C2 {
+
+class Layout3D;
+
+class View3D
+{
+protected:
+       Layout3D &layout;
+       Msp::GL::Camera camera;
+       Msp::GL::Pipeline pipeline;
+
+public:
+       View3D(Layout3D &, unsigned, unsigned);
+
+       Layout3D &get_layout() const { return layout; }
+       Msp::GL::Camera &get_camera() { return camera; }
+       Msp::GL::Pipeline &get_pipeline() { return pipeline; }
+
+       void view_all(bool = false);
+
+       void render();
+};
+
+} // namespace R2C2
+
+#endif