/*! * @file quick_animation.h * 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. */ 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 QuickKeyFrame* prev; //!< The previous QuickKeyFrame }; QuickAnimation(); virtual ~QuickAnimation(); void addEntry(float position, float value); void changeEntry(float position, float value, float region = .04); void removeEntry(float position); /** @todo implemente those functions bool moveEntry(float position); */ float getValue(float position); void debug(); private: QuickKeyFrame* first; //!< The first KeyFrame in a Sequence of Keyframes. QuickKeyFrame* current; //!< The currently selected KeyFrame. unsigned int count; //!< How many Keyframes the QuickAnimation has. }; #endif /* _QUICK_ANIMATION_H */