diff options
Diffstat (limited to 'libraries/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h')
-rw-r--r-- | libraries/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h b/libraries/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h new file mode 100644 index 0000000..7a7fe81 --- /dev/null +++ b/libraries/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h | |||
@@ -0,0 +1,60 @@ | |||
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 __C_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ | ||
6 | #define __C_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ | ||
7 | |||
8 | #include "ISceneNodeAnimatorFinishing.h" | ||
9 | |||
10 | namespace irr | ||
11 | { | ||
12 | namespace scene | ||
13 | { | ||
14 | class CSceneNodeAnimatorFlyStraight : public ISceneNodeAnimatorFinishing | ||
15 | { | ||
16 | public: | ||
17 | |||
18 | //! constructor | ||
19 | CSceneNodeAnimatorFlyStraight(const core::vector3df& startPoint, | ||
20 | const core::vector3df& endPoint, | ||
21 | u32 timeForWay, | ||
22 | bool loop, u32 now, bool pingpong); | ||
23 | |||
24 | //! animates a scene node | ||
25 | virtual void animateNode(ISceneNode* node, u32 timeMs); | ||
26 | |||
27 | //! Writes attributes of the scene node animator. | ||
28 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; | ||
29 | |||
30 | //! Reads attributes of the scene node animator. | ||
31 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); | ||
32 | |||
33 | //! Returns type of the scene node animator | ||
34 | virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_STRAIGHT; } | ||
35 | |||
36 | //! Creates a clone of this animator. | ||
37 | /** Please note that you will have to drop | ||
38 | (IReferenceCounted::drop()) the returned pointer after calling this. */ | ||
39 | virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); | ||
40 | |||
41 | private: | ||
42 | |||
43 | void recalculateIntermediateValues(); | ||
44 | |||
45 | core::vector3df Start; | ||
46 | core::vector3df End; | ||
47 | core::vector3df Vector; | ||
48 | f32 TimeFactor; | ||
49 | u32 StartTime; | ||
50 | u32 TimeForWay; | ||
51 | bool Loop; | ||
52 | bool PingPong; | ||
53 | }; | ||
54 | |||
55 | |||
56 | } // end namespace scene | ||
57 | } // end namespace irr | ||
58 | |||
59 | #endif | ||
60 | |||