Last change
on this file since 4619 was
4597,
checked in by bensch, 19 years ago
|
orxonox/trunk: setClassID implemented in all files
|
File size:
1.4 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 | \todo speedUP this stuff (especially getValue) |
---|
24 | */ |
---|
25 | class QuickAnimation : public BaseObject { |
---|
26 | |
---|
27 | public: |
---|
28 | |
---|
29 | //! a simple struct that stores keyframes for the QuickAnimation-Class. |
---|
30 | struct QuickKeyFrame |
---|
31 | { |
---|
32 | float value; //!< The starting value of this KeyFrame |
---|
33 | float position; //!< The end position of thies KeyFrame |
---|
34 | |
---|
35 | QuickKeyFrame* next; //!< The next Animation |
---|
36 | }; |
---|
37 | |
---|
38 | QuickAnimation(); |
---|
39 | virtual ~QuickAnimation(); |
---|
40 | |
---|
41 | bool addEntry(float position, float value); |
---|
42 | bool changeEntry(float position, float value, float region = .04); |
---|
43 | |
---|
44 | /** \todo implemente thos functions |
---|
45 | bool removeEntry(float position); |
---|
46 | bool moveEntry(float position); |
---|
47 | */ |
---|
48 | |
---|
49 | float getValue(float position); |
---|
50 | |
---|
51 | void debug(void); |
---|
52 | |
---|
53 | private: |
---|
54 | QuickKeyFrame* first; //!< The first KeyFrame in a Sequence of Keyframes |
---|
55 | QuickKeyFrame* current; //!< The currently selected KeyFrame |
---|
56 | }; |
---|
57 | |
---|
58 | #endif /* _QUICK_ANIMATION_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.