GlobeEngine
AvalancheTrainingSimulationEngine.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_AvalancheTrainingSimulationEngine_h
10 #define GlobeEngine_AvalancheTrainingSimulationEngine_h
11 
12 #include <math.h>
13 #include <ctime>
14 #include <iostream>
15 #include <stdio.h>
16 #include <vector>
17 #include "OpenGL_Includes.h"
18 #include "Engine.h"
19 #include "Common.h"
20 #include "DebugLogger.h"
21 #include "Timer.h"
22 #include "MemoryState.h"
23 #include "DebugMap.h"
25 #include "agrio.h"
26 
27 // forward declares
28 namespace ge {
29  class Cube;
30  class Plane;
31  class Sphere;
32  class Cone;
33  class Cylinder;
34  class Flag;
35  class Shader;
36  class CoordinateSystem;
37 }
38 
39 namespace geData {
40  class Heightfield;
41  class ColorisationTable;
42 }
43 
44 namespace geATS {
46  {
47  public:
50 
51  void clear();
52  void destroy();
53  void create();
54 
55  // overrides from ge::Engine
56  void initializeScene(std::string _projectsrcPath=0);
57  void drawScene();
58  void resize(int _w, int _h);
59  void update();
60 
62  private:
63  std::shared_ptr<ge::Shader> programForUtilities;
64  std::shared_ptr<ge::Shader> programForCubes;
65  std::shared_ptr<ge::Shader> programForPlanes;
66  std::shared_ptr<ge::Shader> programForSpheres;
67  std::shared_ptr<ge::Shader> programForDebug;
68  std::shared_ptr<ge::Shader> programForCones;
69  std::shared_ptr<ge::Shader> programForCylinders;
70  std::shared_ptr<ge::Shader> programForFlags;
71 
72  std::shared_ptr<ge::Shader> programForHeightfield;
73 
74  // CoordinateCross
75  std::shared_ptr<ge::CoordinateSystem> coordinateSystem;
76  // Basic scene state
77  ge::SceneStateSet sceneStates[1];
78 
79  // Objects
80  std::shared_ptr<ge::Cube> cube;
81  std::shared_ptr<ge::Plane> plane;
82  std::shared_ptr<ge::Sphere> sphere;
83  std::shared_ptr<ge::Cone> cone;
84  std::shared_ptr<ge::Cone> cone2;
85  std::shared_ptr<ge::Cylinder> cylinder;
86  std::shared_ptr<ge::Flag> flag;
87 
88  // Heightfield
89  std::shared_ptr<geData::Heightfield> heightfield;
90  std::shared_ptr<geData::ColorisationTable> heightfieldColor;
91 
92  float rotationAmount;
93 
94  // Debugger functionality
95  ge::Timer openglTimer;
96  geUtil::DebugMap debugmap;
97 
99  ge::FrameBufferObject gBuffer;
100 
101  int screenWidth;
102  int screenHeight;
103 
104  agrIO::AgrData heightfieldAgr;
105 
106  std::shared_ptr<ge::Texture2Drgba> spheretex;
107  };
108 }
109 #endif
void update()
Definition: AvalancheTrainingSimulationEngine.cpp:259
void resize(int _w, int _h)
Definition: AvalancheTrainingSimulationEngine.cpp:339
Definition: AvalancheTrainingSimulationEngine.h:39
Definition: Cube.h:14
void updateFramebufferStandardID()
Definition: AvalancheTrainingSimulationEngine.cpp:355
Definition: ColorisationTable.h:31
void drawScene()
Definition: AvalancheTrainingSimulationEngine.cpp:279
Definition: DebugMap.h:18
Definition: Plane.h:26
Definition: AvalancheTrainingSimulationComposition.h:13
~AvalancheTrainingSimulationEngine()
Definition: AvalancheTrainingSimulationEngine.cpp:19
Definition: FrameBufferObject.h:20
Definition: Cylinder.h:14
Definition: Sphere.h:18
AvalancheTrainingSimulationEngine()
Definition: AvalancheTrainingSimulationEngine.cpp:14
Definition: Flag.h:14
Definition: AvalancheTrainingSimulationEngine.h:45
Definition: Cone.h:14
Definition: AvalancheTrainingSimulationComposition.h:15
void clear()
Definition: AvalancheTrainingSimulationEngine.cpp:24
Definition: Engine.h:20
void initializeScene(std::string _projectsrcPath=0)
Definition: AvalancheTrainingSimulationEngine.cpp:50
void destroy()
Definition: AvalancheTrainingSimulationEngine.cpp:40
Definition: AvalancheTrainingSimulationEngine.h:28
Definition: SceneStateSet.h:41
Definition: Shader.h:25
void create()
Definition: AvalancheTrainingSimulationEngine.cpp:45
Definition: Heightfield.h:19
Definition: Timer.h:17
Definition: CoordinateSystem.h:17