1 #include "animatedobject.h"
2 #include "animationplayer.h"
10 void AnimationPlayer::play(AnimatedObject &obj, const Animation &anim)
12 slots.push_back(Slot(obj, anim));
15 void AnimationPlayer::tick(const Time::TimeDelta &dt)
17 for(list<Slot>::iterator i=slots.begin(); i!=slots.end(); )
20 i->object.set_matrix(i->iterator.get_matrix());
21 if(const Armature *armature = i->animation.get_armature())
23 unsigned max_index = armature->get_max_link_index();
24 for(unsigned j=0; j<=max_index; ++j)
25 i->object.set_pose_matrix(j, i->iterator.get_pose_matrix(j));
28 if(i->iterator.is_end())
36 AnimationPlayer::Slot::Slot(AnimatedObject &o, const Animation &a):