]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animationplayer.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / animationplayer.cpp
diff --git a/source/animationplayer.cpp b/source/animationplayer.cpp
deleted file mode 100644 (file)
index a929f3c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "animatedobject.h"
-#include "animationplayer.h"
-#include "armature.h"
-
-using namespace std;
-
-namespace Msp {
-namespace GL {
-
-void AnimationPlayer::play(AnimatedObject &obj, const Animation &anim)
-{
-       slots.push_back(Slot(obj, anim));
-}
-
-void AnimationPlayer::tick(const Time::TimeDelta &dt)
-{
-       for(list<Slot>::iterator i=slots.begin(); i!=slots.end(); )
-       {
-               i->iterator += dt;
-               i->object.set_matrix(i->iterator.get_matrix());
-               if(const Armature *armature = i->animation.get_armature())
-               {
-                       unsigned max_index = armature->get_max_link_index();
-                       for(unsigned j=0; j<max_index; ++j)
-                               i->object.set_pose_matrix(j, i->iterator.get_pose_matrix(j));
-               }
-
-               if(i->iterator.is_end())
-                       slots.erase(i++);
-               else
-                       ++i;
-       }
-}
-
-
-AnimationPlayer::Slot::Slot(AnimatedObject &o, const Animation &a):
-       object(o),
-       animation(a),
-       iterator(animation)
-{ }
-
-} // namespace GL
-} // namespace Msp