Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
OgreWrapper.h
Go to the documentation of this file.
1 //
2 // OgreWrapper.h
3 // OOT Tutorial Ogre Framework Demo.
4 // This class is a wrapper to setup ogre
5 //
6 // Created by Wen Tang on 19/01/15.
7 //
8 
9 #pragma once
10 
11 #ifndef _OGREWRAPPER_H_
12 #define _OGREWRAPPER_H_
13 
14 // Using pre-compiled headers to speed up compilation time
15 // stdafx.h includes all necessary Ogre header for Ogre
16 // root and render windows. Check stdfa.h file for details of
17 // include header files
18 #include "stdafx.h"
19 
20 #include <memory>
21 
22 // This class contains a function to initialise Ogre in one go.
24 {
25 private:
26  Ogre::Root *root;
27  Ogre::RenderWindow *window;
28 
29 private:
30  // These functions will prevent the user and the class to creates copies of the original object.
31  OgreWrapper(const OgreWrapper& source);
32  OgreWrapper& operator=(const OgreWrapper& source);
33  void UnLoadResources();
34 
35 public:
36 
37  OgreWrapper();
38  ~OgreWrapper();
39 
40  bool Initialize();
41 
42  Ogre::Root* GetRoot() const {return root;}
43  Ogre::RenderWindow* GetWindow() const { return window; }
44 
45 };
46 
47 #endif
48 
bool Initialize()
Definition: OgreWrapper.cpp:21
Ogre::RenderWindow * window
Definition: OgreWrapper.h:27
Ogre::RenderWindow * GetWindow() const
Definition: OgreWrapper.h:43
Ogre::Root * root
Definition: OgreWrapper.h:26
Ogre::Root * GetRoot() const
Definition: OgreWrapper.h:42
Definition: OgreWrapper.h:23
void UnLoadResources()
Definition: OgreWrapper.cpp:103
OgreWrapper()
Definition: OgreWrapper.cpp:12
~OgreWrapper()
Definition: OgreWrapper.cpp:16
OgreWrapper & operator=(const OgreWrapper &source)