Last change
on this file since 4415 was
4415,
checked in by bensch, 19 years ago
|
orxonox/trunk: added quick-animation for FAST, bad animations that suffice for the properties particles over time
|
File size:
1.2 KB
|
Rev | Line | |
---|
[3245] | 1 | /*! |
---|
[4415] | 2 | \file quick_animation.h |
---|
| 3 | \brief Definition of the QuickAnimation-class |
---|
[3329] | 4 | |
---|
[3245] | 5 | */ |
---|
[1853] | 6 | |
---|
[4415] | 7 | #ifndef _QUICK_ANIMATION_H |
---|
| 8 | #define _QUICK_ANIMATION_H |
---|
[1853] | 9 | |
---|
[3543] | 10 | #include "base_object.h" |
---|
[1853] | 11 | |
---|
[3955] | 12 | // FORWARD DEFINITION |
---|
[3543] | 13 | |
---|
| 14 | |
---|
[2036] | 15 | |
---|
[1853] | 16 | |
---|
[4415] | 17 | //! A class for that linearely interpolates between multiple values. |
---|
| 18 | /** |
---|
| 19 | to be quick this only has the capability to store very little date |
---|
| 20 | |
---|
| 21 | this class is optimized for a raising value. eg. 100 particles sorted |
---|
| 22 | by age. |
---|
| 23 | */ |
---|
| 24 | class QuickAnimation : public BaseObject { |
---|
| 25 | |
---|
[1904] | 26 | public: |
---|
[4415] | 27 | //! a simple struct that stores keyframes for the QuickAnimation-Class. |
---|
| 28 | struct QuickKeyFrame |
---|
| 29 | { |
---|
| 30 | float valueStart; //!< The starting value of this KeyFrame |
---|
| 31 | float valueEnd; //!< The end value of this KeyFrame |
---|
| 32 | float positionStart; //!< The starting position of this KeyFrame |
---|
| 33 | float positionEnd; //!< The end position of thies KeyFrame |
---|
[1853] | 34 | |
---|
[4415] | 35 | QuickKeyFrame* next; //!< The next Animation |
---|
| 36 | }; |
---|
[3245] | 37 | |
---|
[4415] | 38 | QuickAnimation(float rangeStart = 0.0, float valueStart = 0.0, float rangeEnd = 1.0, float valueEnd = 0.0); |
---|
| 39 | virtual ~QuickAnimation(); |
---|
| 40 | |
---|
| 41 | void addEntry(float position, float value); |
---|
| 42 | |
---|
| 43 | float getValue(float position); |
---|
| 44 | |
---|
[3245] | 45 | private: |
---|
[4415] | 46 | QuickKeyFrame* first; |
---|
| 47 | QuickKeyFrame* current; |
---|
[3245] | 48 | |
---|
[1853] | 49 | }; |
---|
| 50 | |
---|
[4415] | 51 | #endif /* _QUICK_ANIMATION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.