Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
GameWorld.h
Go to the documentation of this file.
1 //
2 // GameWorld.h
3 // This class is the interface class between your game to Ogre.
4 // The access point is the pointer to OgreApplication class
5 // OOT Tutorial Ogre Framework Demo.
6 // Created by Wen Tang on 19/01/15.
7 //
8 
9 #pragma once
10 #ifndef _GAME_WORLD_H_
11 #define _GAME_WORLD_H_
12 
13 #include "stdafx.h"
14 #include <iostream>
15 #include "OgreApplication.h"
16 #include "Helicopter.h"
17 #include "Turret.h"
18 #include "TerrainManager.h"
19 #include "Camera.h"
20 
21 class GameWorld : public OgreBites::SdkTrayListener
22 {
23 private:
24 
25  void UpdateGame(float dt);
26  void UpdateScene(Ogre::Vector3 &pos, Ogre::Quaternion &q);
27  Ogre::Matrix3 rotateX(float angle);
28 
29  std::shared_ptr<Camera> camera;
30  std::shared_ptr<Helicopter> helicopter;
31  std::shared_ptr<Turret> turret;
32  std::shared_ptr<Turret> turret2;
33  std::shared_ptr<TerrainManager> terrain;
34 
35  OgreBites::ParamsPanel* healthPanel;
36  OgreBites::ParamsPanel* paramPanel;
37  void CreateGUI();
38 
39  // on screen panel
40  shared_ptr<OgreBites::SdkTrayManager> trayManager;
41  Ogre::FrameEvent frameEvent;
42  OgreBites::InputContext inputContext;
43 
44  Ogre::Vector3 initial_position;
46 
47 public:
48 
49  GameWorld(OgreApplication* application_);
50  ~GameWorld();
51 
52  void Run();
53  void InitilaiseScene();
54  void CreateEnviroment();
55  void CreateLights();
56  void CreateEntities();
57  void Update(float dt, OIS::Keyboard* keyboard, OIS::Mouse* mouse);
58  void Reset();
59 
60 };
61 
62 #endif // End of _GAME_WORLD_H_
std::shared_ptr< Turret > turret2
Definition: GameWorld.h:32
Definition: OgreApplication.h:22
std::shared_ptr< Camera > camera
Definition: GameWorld.h:29
void CreateEnviroment()
Definition: GameWorld.cpp:52
OgreBites::ParamsPanel * healthPanel
Definition: GameWorld.h:35
shared_ptr< OgreBites::SdkTrayManager > trayManager
Definition: GameWorld.h:40
OgreApplication * application
Definition: GameWorld.h:45
void Run()
Definition: GameWorld.cpp:91
void InitilaiseScene()
Definition: GameWorld.cpp:28
void CreateGUI()
Definition: GameWorld.cpp:256
Ogre::FrameEvent frameEvent
Definition: GameWorld.h:41
void CreateEntities()
Definition: GameWorld.cpp:36
Ogre::Vector3 initial_position
Definition: GameWorld.h:44
void Update(float dt, OIS::Keyboard *keyboard, OIS::Mouse *mouse)
Definition: GameWorld.cpp:234
GameWorld(OgreApplication *application_)
Definition: GameWorld.cpp:15
std::shared_ptr< Helicopter > helicopter
Definition: GameWorld.h:30
~GameWorld()
Definition: GameWorld.cpp:24
void UpdateScene(Ogre::Vector3 &pos, Ogre::Quaternion &q)
Definition: GameWorld.cpp:229
std::shared_ptr< Turret > turret
Definition: GameWorld.h:31
OgreBites::ParamsPanel * paramPanel
Definition: GameWorld.h:36
Definition: GameWorld.h:21
OgreBites::InputContext inputContext
Definition: GameWorld.h:42
void Reset()
Definition: GameWorld.cpp:218
void CreateLights()
Definition: GameWorld.cpp:65
std::shared_ptr< TerrainManager > terrain
Definition: GameWorld.h:33
void UpdateGame(float dt)
Definition: GameWorld.cpp:223
Ogre::Matrix3 rotateX(float angle)