/*! \file quick_animation.h \brief Definition of the QuickAnimation-class */ #ifndef _QUICK_ANIMATION_H #define _QUICK_ANIMATION_H #include "base_object.h" // FORWARD DEFINITION //! A class for that linearely interpolates between multiple values. /** to be quick this only has the capability to store very little date this class is optimized for a raising value. eg. 100 particles sorted by age. \todo speedUP this stuff (especially getValue) */ class QuickAnimation : public BaseObject { public: //! a simple struct that stores keyframes for the QuickAnimation-Class. struct QuickKeyFrame { float value; //!< The starting value of this KeyFrame float position; //!< The end position of thies KeyFrame QuickKeyFrame* next; //!< The next Animation }; QuickAnimation(); virtual ~QuickAnimation(); bool addEntry(float position, float value); bool changeEntry(float position, float value, float region = .04); /** \todo implemente thos functions bool removeEntry(float position); bool moveEntry(float position); */ float getValue(float position); void debug(void); private: QuickKeyFrame* first; //!< The first KeyFrame in a Sequence of Keyframes QuickKeyFrame* current; //!< The currently selected KeyFrame }; #endif /* _QUICK_ANIMATION_H */