]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animationplayer.h
Provide a getter for the number of active animations
[libs/gl.git] / source / animationplayer.h
index cc34e16a513f411f1c427364f91eee18bda10b11..db338ffb25b24684975078544bbfa66b2435d6c5 100644 (file)
@@ -37,7 +37,7 @@ private:
                ObjectSlot(AnimatedObject &);
        };
 
-       typedef std::map<AnimatedObject *, ObjectSlot> ObjectMap;
+       typedef std::map<const AnimatedObject *, ObjectSlot> ObjectMap;
 
        ObjectMap objects;
 
@@ -52,6 +52,9 @@ public:
        playing yet, the object's current matrix is used as the base. */
        void play_stacked(AnimatedObject &, const Animation &);
 
+       /// Returns the number of animations currently affecting an object.
+       unsigned get_n_active_animations(const AnimatedObject &) const;
+
        /// Stops any animations affecting an object.
        void stop(AnimatedObject &);