X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstage.h;h=9026d03681b7dc0fb05078216e1c92a00227de48;hb=eab0e547df149ba6972ee2a2b3435e37a4fc0a0c;hp=1ab32d83d27d07fa50be5510c5b7bf8216ab43db;hpb=7857d6ec5961f94bc926b1a969f2c841713f9650;p=libs%2Fdemoscene.git diff --git a/source/stage.h b/source/stage.h index 1ab32d8..9026d03 100644 --- a/source/stage.h +++ b/source/stage.h @@ -1,12 +1,17 @@ #ifndef MSP_DEMOSCENE_STAGE_H_ #define MSP_DEMOSCENE_STAGE_H_ +#include #include -#include "cameracontrol.h" #include "action.h" +#include "demo.h" -struct Stage +namespace Msp { +namespace DemoScene { + +class Stage { +public: class UseInView: public Action { public: @@ -33,11 +38,52 @@ struct Stage 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; + Msp::GL::View *last_view; +public: Stage(); ~Stage(); + + virtual void add_things(Demo::ThingMap &, const std::string &); + virtual void define_actions(Sequencer &, const std::string &) { } + + void set_camera(const Msp::GL::Camera &); + Msp::GL::Camera &get_camera() { return camera; } + +protected: + virtual void create_pipeline(Msp::GL::View &) = 0; }; +} // namespace DemoScene +} // namespace Msp + #endif