aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
new file mode 100644
index 0000000..c17b036
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
@@ -0,0 +1,64 @@
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_CIRCLE_H_INCLUDED__
6#define __C_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__
7
8#include "ISceneNode.h"
9
10namespace irr
11{
12namespace scene
13{
14 class CSceneNodeAnimatorFlyCircle : public ISceneNodeAnimator
15 {
16 public:
17
18 //! constructor
19 CSceneNodeAnimatorFlyCircle(u32 time,
20 const core::vector3df& center, f32 radius,
21 f32 speed, const core::vector3df& direction,
22 f32 radiusEllipsoid);
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_CIRCLE; }
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
39 this. */
40 virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0);
41
42 private:
43 // do some initial calculations
44 void init();
45
46 // circle center
47 core::vector3df Center;
48 // up-vector, normal to the circle's plane
49 core::vector3df Direction;
50 // Two helper vectors
51 core::vector3df VecU;
52 core::vector3df VecV;
53 f32 Radius;
54 f32 RadiusEllipsoid;
55 f32 Speed;
56 u32 StartTime;
57 };
58
59
60} // end namespace scene
61} // end namespace irr
62
63#endif
64