aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h246
1 files changed, 123 insertions, 123 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h b/libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
index 9b4ad2e..3fa6e8d 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
@@ -1,123 +1,123 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ 5#ifndef __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
6#define __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ 6#define __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
7 7
8#include "ISceneNodeAnimatorCameraFPS.h" 8#include "ISceneNodeAnimatorCameraFPS.h"
9#include "vector2d.h" 9#include "vector2d.h"
10#include "position2d.h" 10#include "position2d.h"
11#include "SKeyMap.h" 11#include "SKeyMap.h"
12#include "irrArray.h" 12#include "irrArray.h"
13 13
14namespace irr 14namespace irr
15{ 15{
16namespace gui 16namespace gui
17{ 17{
18 class ICursorControl; 18 class ICursorControl;
19} 19}
20 20
21namespace scene 21namespace scene
22{ 22{
23 23
24 //! Special scene node animator for FPS cameras 24 //! Special scene node animator for FPS cameras
25 class CSceneNodeAnimatorCameraFPS : public ISceneNodeAnimatorCameraFPS 25 class CSceneNodeAnimatorCameraFPS : public ISceneNodeAnimatorCameraFPS
26 { 26 {
27 public: 27 public:
28 28
29 //! Constructor 29 //! Constructor
30 CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, 30 CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl,
31 f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, f32 jumpSpeed=0.f, 31 f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, f32 jumpSpeed=0.f,
32 SKeyMap* keyMapArray=0, u32 keyMapSize=0, bool noVerticalMovement=false, 32 SKeyMap* keyMapArray=0, u32 keyMapSize=0, bool noVerticalMovement=false,
33 bool invertY=false); 33 bool invertY=false);
34 34
35 //! Destructor 35 //! Destructor
36 virtual ~CSceneNodeAnimatorCameraFPS(); 36 virtual ~CSceneNodeAnimatorCameraFPS();
37 37
38 //! Animates the scene node, currently only works on cameras 38 //! Animates the scene node, currently only works on cameras
39 virtual void animateNode(ISceneNode* node, u32 timeMs); 39 virtual void animateNode(ISceneNode* node, u32 timeMs);
40 40
41 //! Event receiver 41 //! Event receiver
42 virtual bool OnEvent(const SEvent& event); 42 virtual bool OnEvent(const SEvent& event);
43 43
44 //! Returns the speed of movement in units per second 44 //! Returns the speed of movement in units per second
45 virtual f32 getMoveSpeed() const; 45 virtual f32 getMoveSpeed() const;
46 46
47 //! Sets the speed of movement in units per second 47 //! Sets the speed of movement in units per second
48 virtual void setMoveSpeed(f32 moveSpeed); 48 virtual void setMoveSpeed(f32 moveSpeed);
49 49
50 //! Returns the rotation speed 50 //! Returns the rotation speed
51 virtual f32 getRotateSpeed() const; 51 virtual f32 getRotateSpeed() const;
52 52
53 //! Set the rotation speed 53 //! Set the rotation speed
54 virtual void setRotateSpeed(f32 rotateSpeed); 54 virtual void setRotateSpeed(f32 rotateSpeed);
55 55
56 //! Sets the keyboard mapping for this animator (old style) 56 //! Sets the keyboard mapping for this animator (old style)
57 //! \param keymap: an array of keyboard mappings, see SKeyMap 57 //! \param keymap: an array of keyboard mappings, see SKeyMap
58 //! \param count: the size of the keyboard map array 58 //! \param count: the size of the keyboard map array
59 virtual void setKeyMap(SKeyMap *map, u32 count); 59 virtual void setKeyMap(SKeyMap *map, u32 count);
60 60
61 //! Sets the keyboard mapping for this animator 61 //! Sets the keyboard mapping for this animator
62 //! \param keymap The new keymap array 62 //! \param keymap The new keymap array
63 virtual void setKeyMap(const core::array<SKeyMap>& keymap); 63 virtual void setKeyMap(const core::array<SKeyMap>& keymap);
64 64
65 //! Gets the keyboard mapping for this animator 65 //! Gets the keyboard mapping for this animator
66 virtual const core::array<SKeyMap>& getKeyMap() const; 66 virtual const core::array<SKeyMap>& getKeyMap() const;
67 67
68 //! Sets whether vertical movement should be allowed. 68 //! Sets whether vertical movement should be allowed.
69 virtual void setVerticalMovement(bool allow); 69 virtual void setVerticalMovement(bool allow);
70 70
71 //! Sets whether the Y axis of the mouse should be inverted. 71 //! Sets whether the Y axis of the mouse should be inverted.
72 /** If enabled then moving the mouse down will cause 72 /** If enabled then moving the mouse down will cause
73 the camera to look up. It is disabled by default. */ 73 the camera to look up. It is disabled by default. */
74 virtual void setInvertMouse(bool invert); 74 virtual void setInvertMouse(bool invert);
75 75
76 //! This animator will receive events when attached to the active camera 76 //! This animator will receive events when attached to the active camera
77 virtual bool isEventReceiverEnabled() const 77 virtual bool isEventReceiverEnabled() const
78 { 78 {
79 return true; 79 return true;
80 } 80 }
81 81
82 //! Returns the type of this animator 82 //! Returns the type of this animator
83 virtual ESCENE_NODE_ANIMATOR_TYPE getType() const 83 virtual ESCENE_NODE_ANIMATOR_TYPE getType() const
84 { 84 {
85 return ESNAT_CAMERA_FPS; 85 return ESNAT_CAMERA_FPS;
86 } 86 }
87 87
88 //! Creates a clone of this animator. 88 //! Creates a clone of this animator.
89 /** Please note that you will have to drop 89 /** Please note that you will have to drop
90 (IReferenceCounted::drop()) the returned pointer once you're 90 (IReferenceCounted::drop()) the returned pointer once you're
91 done with it. */ 91 done with it. */
92 virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); 92 virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0);
93 93
94 private: 94 private:
95 void allKeysUp(); 95 void allKeysUp();
96 96
97 gui::ICursorControl *CursorControl; 97 gui::ICursorControl *CursorControl;
98 98
99 f32 MaxVerticalAngle; 99 f32 MaxVerticalAngle;
100 100
101 f32 MoveSpeed; 101 f32 MoveSpeed;
102 f32 RotateSpeed; 102 f32 RotateSpeed;
103 f32 JumpSpeed; 103 f32 JumpSpeed;
104 // -1.0f for inverted mouse, defaults to 1.0f 104 // -1.0f for inverted mouse, defaults to 1.0f
105 f32 MouseYDirection; 105 f32 MouseYDirection;
106 106
107 s32 LastAnimationTime; 107 s32 LastAnimationTime;
108 108
109 core::array<SKeyMap> KeyMap; 109 core::array<SKeyMap> KeyMap;
110 core::position2d<f32> CenterCursor, CursorPos; 110 core::position2d<f32> CenterCursor, CursorPos;
111 111
112 bool CursorKeys[EKA_COUNT]; 112 bool CursorKeys[EKA_COUNT];
113 113
114 bool firstUpdate; 114 bool firstUpdate;
115 bool firstInput; 115 bool firstInput;
116 bool NoVerticalMovement; 116 bool NoVerticalMovement;
117 }; 117 };
118 118
119} // end namespace scene 119} // end namespace scene
120} // end namespace irr 120} // end namespace irr
121 121
122#endif // __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ 122#endif // __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
123 123