GlobeEngine
TerrainExampleEngine.h
Go to the documentation of this file.
1 
8 #ifndef GlobeEngine_TerrainExampleEngine_h
9 #define GlobeEngine_TerrainExampleEngine_h
10 
11 #include <math.h>
12 #include <ctime>
13 #include <iostream>
14 #include <stdio.h>
15 #include <vector>
16 #include "OpenGL_Includes.h"
17 #include "Engine.h"
18 #include "Shader.h"
19 #include "FlightCamera.h"
20 #include "Common.h"
21 #include "CoordinateSystem.h"
22 #include "SceneStateSet.h"
23 #include "Cube.h"
24 #include "DrawableComponent.h"
25 #include "Plane.h"
26 #include "DebugLogger.h"
27 #include "Timer.h"
28 #include "MemoryState.h"
29 #include "DebugMap.h"
30 #include "Sphere.h"
31 #include "Cone.h"
34 
35 namespace geTerrainExample {
36 
38  {
39  public:
40  TerrainExampleEngine(std::string _sceneFilePath);
42 
43  void clear();
44  void destroy();
45  void create();
46 
47  // overrides from ge::Engine
48  void initializeScene(std::string _projectsrcPath = 0);
49  void drawScene();
50  void resize(int _w, int _h);
51  void update();
52 
54 
55  void printTerrainState();
56 
57  std::shared_ptr<TerrainExampleTerrainModule> getTerrainModule();
58 
59  private:
60  std::shared_ptr<ge::Shader> programForUtilities;
61  std::shared_ptr<ge::Shader> programForCubes;
62  std::shared_ptr<ge::Shader> programForSpheres;
63  std::shared_ptr<ge::Shader> programForDebug;
64 
65  // Terrain module
66  std::shared_ptr<geTerrainExample::TerrainExampleTerrainModule> terrainmodule;
67 
68  // CoordinateCross
69  ge::CoordinateSystem coordinateSystem;
70  // Basic scene state
71  ge::SceneStateSet sceneStates[1];
72 
73  std::shared_ptr<ge::Cube> cube;
74  std::shared_ptr<ge::Sphere> sphere;
75 
76  float rotationAmount;
77 
78  geUtil::DebugMap debugmap;
79 
80  TerrainExampleComposition uiComposition;
81  ge::FrameBufferObject gBuffer;
82 
83  int screenWidth;
84  int screenHeight;
85 
86  std::shared_ptr<ge::Texture2Drgba> spheretex;
87 
88  // path to xml command line argument
89  std::string sceneFilePath;
90  };
91 }
92 #endif
void printTerrainState()
Definition: TerrainExampleEngine.cpp:291
Definition: DebugMap.h:18
Definition: FrameBufferObject.h:20
void create()
Definition: TerrainExampleEngine.cpp:31
Definition: TerrainExampleComposition.h:13
void initializeScene(std::string _projectsrcPath=0)
Definition: TerrainExampleEngine.cpp:36
void update()
Definition: TerrainExampleEngine.cpp:166
Definition: Engine.h:20
void destroy()
Definition: TerrainExampleEngine.cpp:26
TerrainExampleEngine(std::string _sceneFilePath)
Definition: TerrainExampleEngine.cpp:6
void clear()
Definition: TerrainExampleEngine.cpp:17
Definition: TerrainExampleEngine.h:37
void resize(int _w, int _h)
Definition: TerrainExampleEngine.cpp:268
Definition: SceneStateSet.h:41
void updateFramebufferStandardID()
Definition: TerrainExampleEngine.cpp:283
Definition: TerrainExampleComposition.h:15
void drawScene()
Definition: TerrainExampleEngine.cpp:209
Definition: CoordinateSystem.h:17
~TerrainExampleEngine()
Definition: TerrainExampleEngine.cpp:12
std::shared_ptr< TerrainExampleTerrainModule > getTerrainModule()
Definition: TerrainExampleEngine.cpp:295