Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
CameraController.h
Go to the documentation of this file.
1 
2 #ifndef _Demo_CameraController_H_
3 #define _Demo_CameraController_H_
4 
5 #include "OGRE/OgrePrerequisites.h"
6 #include "TutorialGameState.h"
7 
8 namespace Demo
9 {
11  {
12  bool mUseSceneNode;
13 
14  bool mSpeedMofifier;
15  bool mWASD[4];
16  bool mSlideUpDown[2];
17  float mCameraYaw;
18  float mCameraPitch;
19  public: float mCameraBaseSpeed;
20  public: float mCameraSpeedBoost;
21 
22  private:
23  GraphicsSystem *mGraphicsSystem;
24 
25  public:
26  CameraController( GraphicsSystem *graphicsSystem, bool useSceneNode=false );
27 
28  void update( float timeSinceLast );
29 
31  bool keyPressed( const SDL_KeyboardEvent &arg );
33  bool keyReleased( const SDL_KeyboardEvent &arg );
34 
35  void mouseMoved( const SDL_Event &arg );
36  };
37 }
38 
39 #endif
SDL_KeyboardEvent
Keyboard button event structure (event.key.
Definition: SdlEmulationLayer.h:676
Demo::GraphicsSystem::getRenderWindow
Ogre::Window * getRenderWindow(void) const
Definition: GraphicsSystem.h:145
SDL_Event::motion
SDL_MouseMotionEvent motion
Mouse motion event data.
Definition: SdlEmulationLayer.h:739
SDL_SCANCODE_PAGEUP
@ SDL_SCANCODE_PAGEUP
Definition: SdlEmulationLayer.h:151
width
int width
Definition: bgfx.cpp:19
SDL_Keysym::scancode
SDL_Scancode scancode
SDL physical key code - see SDL_Scancode for details.
Definition: SdlEmulationLayer.h:667
SDL_SCANCODE_W
@ SDL_SCANCODE_W
Definition: SdlEmulationLayer.h:55
Demo
Definition: BaseSystem.cpp:5
SDL_SCANCODE_LSHIFT
@ SDL_SCANCODE_LSHIFT
Definition: SdlEmulationLayer.h:308
Demo::CameraController::mCameraSpeedBoost
float mCameraSpeedBoost
Definition: CameraController.h:20
Demo::CameraController::CameraController
CameraController(GraphicsSystem *graphicsSystem, bool useSceneNode=false)
Definition: CameraController.cpp:13
SDL_SCANCODE_S
@ SDL_SCANCODE_S
Definition: SdlEmulationLayer.h:51
Demo::GraphicsSystem::getCamera
Ogre::Camera * getCamera(void) const
Definition: GraphicsSystem.h:147
Demo::CameraController::keyPressed
bool keyPressed(const SDL_KeyboardEvent &arg)
Returns true if we've handled the event.
Definition: CameraController.cpp:73
Demo::CameraController
Definition: CameraController.h:10
SDL_SCANCODE_PAGEDOWN
@ SDL_SCANCODE_PAGEDOWN
Definition: SdlEmulationLayer.h:154
Demo::CameraController::mCameraBaseSpeed
float mCameraBaseSpeed
Definition: CameraController.h:19
camera
BlamDirector * camera
Definition: director.cpp:3
timeSinceLast
double timeSinceLast
Definition: ogre.cpp:57
CameraController.h
height
int height
Definition: bgfx.cpp:20
GraphicsSystem.h
TutorialGameState.h
Demo::GraphicsSystem
Definition: GraphicsSystem.h:26
Demo::CameraController::update
void update(float timeSinceLast)
Definition: CameraController.cpp:26
SDL_MouseMotionEvent::yrel
Ogre::int32 yrel
The relative motion in the Y direction.
Definition: SdlEmulationLayer.h:701
SDL_MouseMotionEvent::xrel
Ogre::int32 xrel
The relative motion in the X direction.
Definition: SdlEmulationLayer.h:700
SDL_Event
Definition: SdlEmulationLayer.h:735
SDL_SCANCODE_D
@ SDL_SCANCODE_D
Definition: SdlEmulationLayer.h:36
Demo::CameraController::mouseMoved
void mouseMoved(const SDL_Event &arg)
Definition: CameraController.cpp:119
Demo::CameraController::keyReleased
bool keyReleased(const SDL_KeyboardEvent &arg)
Returns true if we've handled the event.
Definition: CameraController.cpp:96
SDL_KeyboardEvent::keysym
SDL_Keysym keysym
The key that was pressed or released.
Definition: SdlEmulationLayer.h:685
SDL_SCANCODE_A
@ SDL_SCANCODE_A
Definition: SdlEmulationLayer.h:33