Last change
on this file since 4917 was
4836,
checked in by bensch, 19 years ago
|
orxonox/trunk: renamed all the \param → @param and so on in Doxygen tags.
Thanks a lot to the kDevelop team. this took since the last commit
|
File size:
1.5 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file quick_animation.h |
---|
3 | * 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 | |
---|
28 | //! a simple struct that stores keyframes for the QuickAnimation-Class. |
---|
29 | struct QuickKeyFrame |
---|
30 | { |
---|
31 | float value; //!< The starting value of this KeyFrame |
---|
32 | float position; //!< The end position of thies KeyFrame |
---|
33 | |
---|
34 | QuickKeyFrame* next; //!< The next Animation |
---|
35 | QuickKeyFrame* prev; //!< The previous QuickKeyFrame |
---|
36 | }; |
---|
37 | |
---|
38 | QuickAnimation(); |
---|
39 | virtual ~QuickAnimation(); |
---|
40 | |
---|
41 | void addEntry(float position, float value); |
---|
42 | void changeEntry(float position, float value, float region = .04); |
---|
43 | |
---|
44 | void removeEntry(float position); |
---|
45 | /** @todo implemente those functions |
---|
46 | bool moveEntry(float position); |
---|
47 | */ |
---|
48 | |
---|
49 | float getValue(float position); |
---|
50 | |
---|
51 | void debug(); |
---|
52 | |
---|
53 | private: |
---|
54 | QuickKeyFrame* first; //!< The first KeyFrame in a Sequence of Keyframes. |
---|
55 | QuickKeyFrame* current; //!< The currently selected KeyFrame. |
---|
56 | unsigned int count; //!< How many Keyframes the QuickAnimation has. |
---|
57 | }; |
---|
58 | |
---|
59 | #endif /* _QUICK_ANIMATION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.