X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fview.h;h=a191a150ec60e1cd9819ed2ce8e7bd9a1f9db884;hb=7b4155fa0581d7c5fe198e4fb1dea61fa0846eec;hp=f3e359c2b9524108b1f566a9e19ffc1ad0e31c92;hpb=d15ac13f2e170f155b4bbd124df48400c339b644;p=r2c2.git diff --git a/source/3d/view.h b/source/3d/view.h index f3e359c..a191a15 100644 --- a/source/3d/view.h +++ b/source/3d/view.h @@ -1,30 +1,50 @@ #ifndef R2C2_3D_VIEW_H_ #define R2C2_3D_VIEW_H_ +#include #include +#include #include +#include +#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); + ~View3D(); Layout3D &get_layout() const { return layout; } 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