Last change
on this file since 3859 was
3847,
checked in by bensch, 20 years ago
|
orxonox/trunk: naming of animation changed
Anim → Animation
tAnim → tAnimation
Animation → Animation3D
@paede: i hope you like it.
|
File size:
1.6 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file animation_player.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _ANIMATION_PLAYER_H |
---|
6 | #define _ANIMATION_PLAYER_H |
---|
7 | |
---|
8 | #include "base_object.h" |
---|
9 | #include "animation.h" |
---|
10 | |
---|
11 | /* FORWARD DEFINITION */ |
---|
12 | |
---|
13 | //! A AnimationPlayer, that handles the animation of all the Animations in the scene. |
---|
14 | /** |
---|
15 | <b>AnimationPlayer usage:</b> \n |
---|
16 | |
---|
17 | <b>Initialisation</b>: AnimationPlayer::getInstance() does the trick this is |
---|
18 | usually done when initializing a world \n |
---|
19 | <b>Adding Animations</b>: create an Animation the following Way: |
---|
20 | \li Anim* animation = new Anim(); // also use any other Subclass of Animation to initialize this |
---|
21 | \li set some parameters: also see the specific classes for more info |
---|
22 | \n |
---|
23 | if you do not want a specific Animation to be handled by the AnimationPlayer, you have to |
---|
24 | unload it explicitely with animation->doNotHandle(); |
---|
25 | \n |
---|
26 | eveything else will be done by the AnimationPlayer itself.\n |
---|
27 | */ |
---|
28 | class AnimationPlayer : public BaseObject { |
---|
29 | |
---|
30 | public: |
---|
31 | static AnimationPlayer* getInstance(void); |
---|
32 | virtual ~AnimationPlayer(void); |
---|
33 | |
---|
34 | // animation handling |
---|
35 | void addAnimation(Animation* animation); |
---|
36 | void removeAnimation(Animation* animation); |
---|
37 | void flush(void); |
---|
38 | |
---|
39 | // time functions |
---|
40 | void tick(float timePassed); |
---|
41 | void play(void); |
---|
42 | void pause(void); |
---|
43 | |
---|
44 | Animation* getObjectFromBaseObject(const BaseObject* baseObject) const; |
---|
45 | |
---|
46 | void debug(void); |
---|
47 | |
---|
48 | private: |
---|
49 | /* singleton */ |
---|
50 | AnimationPlayer(void); |
---|
51 | static AnimationPlayer* singletonRef; |
---|
52 | |
---|
53 | /* class specific */ |
---|
54 | tList<Animation>* animationList; //!< A List of Animations to be handled. |
---|
55 | bool bRunning; //!< If the AnimationPlayer is running. |
---|
56 | }; |
---|
57 | |
---|
58 | |
---|
59 | #endif /* _ANIMATION_PLAYER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.