/*! \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. */ class QuickAnimation : public BaseObject { public: //! a simple struct that stores keyframes for the QuickAnimation-Class. struct QuickKeyFrame { float valueStart; //!< The starting value of this KeyFrame float valueEnd; //!< The end value of this KeyFrame float positionStart; //!< The starting position of this KeyFrame float positionEnd; //!< The end position of thies KeyFrame QuickKeyFrame* next; //!< The next Animation }; QuickAnimation(float rangeStart = 0.0, float valueStart = 0.0, float rangeEnd = 1.0, float valueEnd = 0.0); virtual ~QuickAnimation(); void addEntry(float position, float value); float getValue(float position); private: QuickKeyFrame* first; QuickKeyFrame* current; }; #endif /* _QUICK_ANIMATION_H */