Last change
on this file since 4448 was
4425,
checked in by bensch, 20 years ago
|
orxonox/trunk: minor update on quickAnimation
|
File size:
1.2 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file quick_animation.h |
---|
3 | \brief Definition of the QuickAnimation-class |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _QUICK_ANIMATION_H |
---|
8 | #define _QUICK_ANIMATION_H |
---|
9 | |
---|
10 | #include "base_object.h" |
---|
11 | |
---|
12 | // FORWARD DEFINITION |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
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 | |
---|
26 | public: |
---|
27 | //! a simple struct that stores keyframes for the QuickAnimation-Class. |
---|
28 | struct QuickKeyFrame |
---|
29 | { |
---|
30 | float value; //!< The starting value of this KeyFrame |
---|
31 | float position; //!< The end position of thies KeyFrame |
---|
32 | |
---|
33 | QuickKeyFrame* next; //!< The next Animation |
---|
34 | }; |
---|
35 | |
---|
36 | QuickAnimation(); |
---|
37 | virtual ~QuickAnimation(); |
---|
38 | |
---|
39 | bool addEntry(float position, float value); |
---|
40 | bool changeEntry(float position, float value, float region = .04); |
---|
41 | |
---|
42 | /** \todo implemente thos functions |
---|
43 | bool removeEntry(float position); |
---|
44 | bool moveEntry(float position); |
---|
45 | */ |
---|
46 | float getValue(float position); |
---|
47 | |
---|
48 | void debug(void); |
---|
49 | private: |
---|
50 | QuickKeyFrame* first; |
---|
51 | QuickKeyFrame* current; |
---|
52 | }; |
---|
53 | |
---|
54 | #endif /* _QUICK_ANIMATION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.