]> git.tdb.fi Git - libs/demoscene.git/blobdiff - source/animate.h
Merge CameraControl functionality into other classes
[libs/demoscene.git] / source / animate.h
diff --git a/source/animate.h b/source/animate.h
new file mode 100644 (file)
index 0000000..d386a7a
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef MSP_DEMOSCENE_ANIMATE_H_
+#define MSP_DEMOSCENE_ANIMATE_H_
+
+#include <msp/gl/animation.h>
+#include <msp/gl/animationplayer.h>
+#include "action.h"
+
+class Animate: public Action
+{
+public:
+       class Loader: public Msp::DataFile::DerivedObjectLoader<Animate, Action::Loader>
+       {
+       public:
+               Loader(Animate &, Demo &);
+
+       private:
+               void animation(const std::string &);
+               void target(const std::string &);
+       };
+
+private:
+       Msp::GL::Placeable *target;
+       const Msp::GL::Animation *anim;
+       Msp::GL::AnimationPlayer *player;
+
+public:
+       Animate();
+       Animate(Msp::GL::Placeable &, const Msp::GL::Animation &, Msp::GL::AnimationPlayer &);
+
+       virtual void validate() const;
+
+       virtual void start(float, float);
+};
+
+#endif