]> git.tdb.fi Git - libs/demoscene.git/blob - source/animate.h
Put everything in namespace Msp::DemoScene
[libs/demoscene.git] / source / animate.h
1 #ifndef MSP_DEMOSCENE_ANIMATE_H_
2 #define MSP_DEMOSCENE_ANIMATE_H_
3
4 #include <msp/gl/animation.h>
5 #include <msp/gl/animationplayer.h>
6 #include "action.h"
7
8 namespace Msp {
9 namespace DemoScene {
10
11 class Animate: public Action
12 {
13 public:
14         class Loader: public Msp::DataFile::DerivedObjectLoader<Animate, Action::Loader>
15         {
16         public:
17                 Loader(Animate &, Demo &);
18
19         private:
20                 void animation(const std::string &);
21                 void target(const std::string &);
22         };
23
24 private:
25         Msp::GL::Placeable *target;
26         const Msp::GL::Animation *anim;
27         Msp::GL::AnimationPlayer *player;
28
29 public:
30         Animate();
31         Animate(Msp::GL::Placeable &, const Msp::GL::Animation &, Msp::GL::AnimationPlayer &);
32
33         virtual void validate() const;
34
35         virtual void start(float, float);
36 };
37
38 } // namespace DemoScene
39 } // namespace Msp
40
41 #endif