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