X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstage.h;h=7d4664fb2b4a2a70122abb04a5ba5e4092378c42;hb=e34e82619af0704b465e081f257f9952972e04b2;hp=c43cccb31601e2d86637706c69224973f7489979;hpb=423a982cb00a9ec74fc154d729cbf88518adc6d8;p=libs%2Fdemoscene.git diff --git a/source/stage.h b/source/stage.h index c43cccb..7d4664f 100644 --- a/source/stage.h +++ b/source/stage.h @@ -1,12 +1,14 @@ #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: @@ -16,8 +18,8 @@ struct Stage Loader(UseInView &, Demo &); private: - void view(const std::string &); void stage(const std::string &); + void view(const std::string &); }; private: @@ -33,11 +35,48 @@ 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 &); + + void set_camera(const Msp::GL::Camera &); + Msp::GL::Camera &get_camera() { return camera; } + +protected: + virtual void create_pipeline(Msp::GL::View &) = 0; }; #endif