X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstage.h;h=c108f6fcd66ddda1f9c5b9ca0cb2324d23227db9;hb=e2032cbdb8d2ae52e42d400c5cc90ddad844f665;hp=2933856c1d000428003bd8fc129e5db9d112940a;hpb=8ffa42fba0e6a13286b465473fd399cac7c77dcf;p=libs%2Fdemoscene.git diff --git a/source/stage.h b/source/stage.h index 2933856..c108f6f 100644 --- a/source/stage.h +++ b/source/stage.h @@ -1,29 +1,78 @@ #ifndef MSP_DEMOSCENE_STAGE_H_ #define MSP_DEMOSCENE_STAGE_H_ +#include #include -#include "cameracontrol.h" #include "action.h" +#include "demo.h" -struct Stage +class Stage { +public: class UseInView: public Action { + public: + class Loader: public Msp::DataFile::DerivedObjectLoader + { + public: + Loader(UseInView &, Demo &); + + private: + void stage(const std::string &); + void view(const std::string &); + }; + private: - Msp::GL::View &view; - Stage &stage; + Msp::GL::View *view; + Stage *stage; public: + UseInView(); UseInView(Msp::GL::View &, Stage &); + virtual void validate() const; + virtual void start(float, float); }; + class SetCamera: public Action + { + public: + class Loader: public Msp::DataFile::DerivedObjectLoader + { + public: + Loader(SetCamera &, Demo &); + + private: + void camera(const std::string &); + void stage(const std::string &); + }; + + private: + Stage *stage; + const Msp::GL::Camera *camera; + + public: + SetCamera(); + SetCamera(Stage &, const Msp::GL::Camera &); + + virtual void validate() const; + + virtual void start(float, float); + }; + +protected: Msp::GL::Pipeline *pipeline; - CameraControl camera_control; + Msp::GL::Camera camera; +public: Stage(); ~Stage(); + + virtual void add_things(Demo::ThingMap &, const std::string &); + void add_postprocessor(Msp::GL::PostProcessor &); + void set_camera(const Msp::GL::Camera &); + Msp::GL::Camera &get_camera() { return camera; } }; #endif