]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animationplayer.h
Change some class names
[libs/gl.git] / source / animationplayer.h
index 93482c74f9b88daac2744e343f2bc04ab6bbdb42..63e6e030d03aa68b30efa2a63aa169b077986402 100644 (file)
@@ -17,31 +17,31 @@ can handle an arbitrary number of animations simultaneously.
 class AnimationPlayer
 {
 private:
-       struct AnimationSlot
+       struct PlayingAnimation
        {
                const Animation *animation;
                Animation::Iterator iterator;
 
-               AnimationSlot(const Animation &);
+               PlayingAnimation(const Animation &);
        };
 
-       struct ObjectSlot
+       struct Target: AnimationEventObserver
        {
                AnimatedObject &object;
                Matrix base_matrix;
                const Armature *armature;
-               std::vector<AnimationSlot> animations;
+               std::vector<PlayingAnimation> animations;
                bool stacked;
 
-               ObjectSlot(AnimatedObject &);
+               Target(AnimatedObject &);
        };
 
-       typedef std::map<const AnimatedObject *, ObjectSlot> ObjectMap;
+       typedef std::map<const AnimatedObject *, Target> ObjectMap;
 
        ObjectMap objects;
 
 private:
-       ObjectSlot &get_slot(AnimatedObject &);
+       Target &get_slot(AnimatedObject &);
 
 public:
        /// Plays an animation on an object.  Any previous animations are replaced.
@@ -65,8 +65,8 @@ public:
        void tick(const Time::TimeDelta &);
 
 private:
-       bool tick_single(ObjectSlot &, const Time::TimeDelta &);
-       bool tick_stacked(ObjectSlot &, const Time::TimeDelta &);
+       bool tick_single(Target &, const Time::TimeDelta &);
+       bool tick_stacked(Target &, const Time::TimeDelta &);
        static void set_object_uniform(AnimatedObject &, const std::string &, const KeyFrame::AnimatedUniform &);
 };