aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-28 22:28:34 +1000
committerDavid Walter Seikel2016-03-28 22:28:34 +1000
commit7028cbe09c688437910a25623098762bf0fa592d (patch)
tree10b5af58277d9880380c2251f109325542c4e6eb /src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
parentMove lemon to the src/others directory. (diff)
downloadSledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz
Move Irrlicht to src/others.
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
new file mode 100644
index 0000000..a202328
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
@@ -0,0 +1,63 @@
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_FOLLOW_SPLINE_H_INCLUDED__
6#define __C_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__
7
8#include "ISceneNode.h"
9#include "irrArray.h"
10#include "ISceneNodeAnimatorFinishing.h"
11
12namespace irr
13{
14namespace scene
15{
16 //! Scene node animator based free code Matthias Gall wrote and sent in. (Most of
17 //! this code is written by him, I only modified bits.)
18 class CSceneNodeAnimatorFollowSpline : public ISceneNodeAnimatorFinishing
19 {
20 public:
21
22 //! constructor
23 CSceneNodeAnimatorFollowSpline(u32 startTime,
24 const core::array< core::vector3df >& points,
25 f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false);
26
27 //! animates a scene node
28 virtual void animateNode(ISceneNode* node, u32 timeMs);
29
30 //! Writes attributes of the scene node animator.
31 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
32
33 //! Reads attributes of the scene node animator.
34 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
35
36 //! Returns type of the scene node animator
37 virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FOLLOW_SPLINE; }
38
39 //! Creates a clone of this animator.
40 /** Please note that you will have to drop
41 (IReferenceCounted::drop()) the returned pointer after calling
42 this. */
43 virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0);
44
45 protected:
46
47 //! clamps a the value idx to fit into range 0..size-1
48 s32 clamp(s32 idx, s32 size);
49
50 core::array< core::vector3df > Points;
51 f32 Speed;
52 f32 Tightness;
53 u32 StartTime;
54 bool Loop;
55 bool PingPong;
56 };
57
58
59} // end namespace scene
60} // end namespace irr
61
62#endif
63