~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to source/Irrlicht/CSceneNodeAnimatorFlyCircle.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2002-2011 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
 
 
10
namespace irr
 
11
{
 
12
namespace 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