aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h
new file mode 100644
index 0000000..e03d975
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h
@@ -0,0 +1,78 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_SCENE_NODE_ANIMATOR_H_INCLUDED__
6#define __I_SCENE_NODE_ANIMATOR_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "vector3d.h"
10#include "ESceneNodeAnimatorTypes.h"
11#include "IAttributeExchangingObject.h"
12#include "IEventReceiver.h"
13
14namespace irr
15{
16namespace io
17{
18 class IAttributes;
19} // end namespace io
20namespace scene
21{
22 class ISceneNode;
23 class ISceneManager;
24
25 //! Animates a scene node. Can animate position, rotation, material, and so on.
26 /** A scene node animator is able to animate a scene node in a very simple way. It may
27 change its position, rotation, scale and/or material. There are lots of animators
28 to choose from. You can create scene node animators with the ISceneManager interface.
29 */
30 class ISceneNodeAnimator : public io::IAttributeExchangingObject, public IEventReceiver
31 {
32 public:
33 //! Animates a scene node.
34 /** \param node Node to animate.
35 \param timeMs Current time in milli seconds. */
36 virtual void animateNode(ISceneNode* node, u32 timeMs) =0;
37
38 //! Creates a clone of this animator.
39 /** Please note that you will have to drop
40 (IReferenceCounted::drop()) the returned pointer after calling this. */
41 virtual ISceneNodeAnimator* createClone(ISceneNode* node,
42 ISceneManager* newManager=0) =0;
43
44 //! Returns true if this animator receives events.
45 /** When attached to an active camera, this animator will be
46 able to respond to events such as mouse and keyboard events. */
47 virtual bool isEventReceiverEnabled() const
48 {
49 return false;
50 }
51
52 //! Event receiver, override this function for camera controlling animators
53 virtual bool OnEvent(const SEvent& event)
54 {
55 return false;
56 }
57
58 //! Returns type of the scene node animator
59 virtual ESCENE_NODE_ANIMATOR_TYPE getType() const
60 {
61 return ESNAT_UNKNOWN;
62 }
63
64 //! Returns if the animator has finished.
65 /** This is only valid for non-looping animators with a discrete end state.
66 \return true if the animator has finished, false if it is still running. */
67 virtual bool hasFinished(void) const
68 {
69 return false;
70 }
71 };
72
73
74} // end namespace scene
75} // end namespace irr
76
77#endif
78