]> git.lizzy.rs Git - irrlicht.git/blob - include/ISceneNodeAnimatorCameraFPS.h
Bump revision to 1.9.0mt3
[irrlicht.git] / include / ISceneNodeAnimatorCameraFPS.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__\r
6 #define __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__\r
7 \r
8 #include "ISceneNodeAnimator.h"\r
9 #include "IEventReceiver.h"\r
10 #include "irrArray.h"\r
11 \r
12 namespace irr\r
13 {\r
14         struct SKeyMap;\r
15 \r
16 namespace scene\r
17 {\r
18 \r
19         //! Special scene node animator for FPS cameras\r
20         /** This scene node animator can be attached to a camera to make it act\r
21         like a first person shooter\r
22         */\r
23         class ISceneNodeAnimatorCameraFPS : public ISceneNodeAnimator\r
24         {\r
25         public:\r
26 \r
27                 //! Returns the speed of movement in units per millisecond\r
28                 virtual f32 getMoveSpeed() const = 0;\r
29 \r
30                 //! Sets the speed of movement in units per millisecond\r
31                 virtual void setMoveSpeed(f32 moveSpeed) = 0;\r
32 \r
33                 //! Returns the rotation speed when using keyboard\r
34                 virtual f32 getRotateSpeedKeyboard() const = 0;\r
35 \r
36                 //! Set the rotation speed when using keyboard\r
37                 virtual void setRotateSpeedKeyboard(f32 rotateSpeed) = 0;\r
38 \r
39                 //! Returns the rotation speed in degrees when using mouse\r
40                 /** The degrees are equivalent to a half screen movement of the mouse,\r
41                 i.e. if the mouse cursor had been moved to the border of the screen since\r
42                 the last animation. */\r
43                 virtual f32 getRotateSpeed() const = 0;\r
44 \r
45                 //! Set the rotation speed in degrees when using mouse\r
46                 virtual void setRotateSpeed(f32 rotateSpeed) = 0;\r
47 \r
48                 //! Sets the keyboard mapping for this animator (old style)\r
49                 /** \param map Array of keyboard mappings, see irr::SKeyMap\r
50                 \param count Size of the keyboard map array. */\r
51                 virtual void setKeyMap(SKeyMap *map, u32 count) = 0;\r
52 \r
53                 //! Sets the keyboard mapping for this animator\r
54                 //! \param keymap The new keymap array\r
55                 virtual void setKeyMap(const core::array<SKeyMap>& keymap) = 0;\r
56 \r
57                 //! Gets the keyboard mapping for this animator\r
58                 virtual const core::array<SKeyMap>& getKeyMap() const = 0;\r
59 \r
60                 //! Sets whether vertical movement should be allowed.\r
61                 /** If vertical movement is enabled then the camera may fight with\r
62                 gravity causing camera shake. Disable this if the camera has\r
63                 a collision animator with gravity enabled. */\r
64                 virtual void setVerticalMovement(bool allow) = 0;\r
65 \r
66                 //! Sets whether the Y axis of the mouse should be inverted.\r
67                 /** If enabled then moving the mouse down will cause\r
68                 the camera to look up. It is disabled by default. */\r
69                 virtual void setInvertMouse(bool invert) = 0;\r
70         };\r
71 } // end namespace scene\r
72 } // end namespace irr\r
73 \r
74 #endif\r
75 \r