GlobeEngine
BluePrints.h
Go to the documentation of this file.
1 
8 #ifndef GlobeEngine_BluePrints_h
9 #define GlobeEngine_BluePrints_h
10 
11 #include "Camera.h"
12 #include "VBOVertex.h"
13 #include "Jzon.h"
14 #include <vector>
15 #include <vmmlib/vmmlib.hpp>
16 
17 namespace ge {
18 
20  {
21  std::string animatedObject;
22  double time;
23  std::vector<vmml::Vector3d> controlpoints;
24  };
25 
27  {
28  vmml::Vector2f coordinates;
29  vmml::Vector2i extent;
30  };
31 
33  {
34  double nearplane;
35  double farplane;
36  double fov;
37  vmml::Vector3d pos;
39  double velocity;
40  double pitch;
41  double heading;
42  std::string orientation;
43  vmml::Vector2d viewportSize;
44  vmml::Vector4d orthoCoord;
47  std::string name;
48  std::string typeString;
49  };
50 
52  {
54  ShaderBlueprint(std::string _name) : name(_name){}
55  std::string name;
56  std::string file;
57  bool isGeneric;
58  int type;
59  std::vector<std::string> defines;
60  std::vector<int> definesValues;
61  };
62 
64  {
65  std::string type;
66  std::string name;
67  std::shared_ptr<ge::ShaderBlueprint> shaderObj;
68  vmml::Vector3f clearColor;
69  };
70 
72  {
73  std::vector< std::shared_ptr<PipelineElementBlueprint> > pipelineElementsBlueprints;
74 
75  };
76 
78  {
79  std::string name;
80  std::string repourl;
81  std::string format;
82  std::shared_ptr<ShaderBlueprint> shader;
83  vmml::Vector3d pos;
84  vmml::Vector3d scale;
85  };
86 
88  {
89  std::string name;
90  std::string type;
91  std::string url;
92  GLuint pixelCount;
93  };
94 
96  {
97  std::string gpuprogrampath;
98  std::string shaderpath;
99  std::string globalShaderPath;
100  std::vector< std::shared_ptr<ShaderBlueprint> > shaderblueprints;
101  std::vector< std::shared_ptr<CameraBlueprint> > camerablueprints;
102  std::vector< std::shared_ptr<SkyboxBlueprint> > skyboxBlueprint;
103  std::shared_ptr<ge::PipelineBlueprint> pipelineBlueprint;
104 
105  //vmml::Vector3f clearColor;
106  vmml::Vector3f pickingColor;
107  vmml::Vector2f pickingOffset;
108 
111  };
112 
114  {
115  std::string name;
116  vmml::Vector3f pos;
117  };
118 
119  class Blueprint
120  {
121  public:
124 
125  std::shared_ptr<ge::EngineBlueprint> engineBlueprint;
126  std::shared_ptr<ge::WindowBlueprint> windowBlueprint;
127  std::shared_ptr<ge::PipelineElementBlueprint> const& findCompositionIDbyName(std::string _name);
128  std::vector< std::shared_ptr<ge::AnimationPathBlueprint> > animationPathBlueprints;
129 
130  static std::shared_ptr<ge::ShaderBlueprint> readShaderContentFromJSONElement(const Jzon::Node& _config);
131 
132  protected:
133  // IO Serialization
134  void readEngineConfigFromJSON(const Jzon::Node& _config);
135  static Jzon::Node readAConfigFromJSON(std::string _configFile);
136 
137  std::shared_ptr<ge::WindowBlueprint> readWindowFromJSONElement(const Jzon::Node& _config);
138  std::shared_ptr<ge::SkyboxBlueprint> readSkyboxFromJSONElement(const Jzon::Node& _config);
139  std::shared_ptr<ge::ShaderBlueprint> readShaderFromJSONElement(const Jzon::Node& _config, std::string _elementName = "shader");
140  std::shared_ptr<ge::CameraBlueprint> readCameraFromJSONElement(const Jzon::Node& _config);
141  std::shared_ptr<ge::PipelineElementBlueprint> readPipelineElementFromJSONElement(const Jzon::Node& _config);
142  std::shared_ptr<ge::AnimationPathBlueprint> getAnimationPathFromJSONElement(const Jzon::Node& _config);
143 
144  // Absolute path to config repository
145  std::string abspath;
146 
147  };
148 
149 }
150 #endif
std::string globalShaderPath
Definition: BluePrints.h:99
int type
Definition: BluePrints.h:58
double fov
Definition: BluePrints.h:36
double velocity
Definition: BluePrints.h:39
vmml::Vector3f pos
Definition: BluePrints.h:116
Definition: BluePrints.h:87
std::string name
Definition: BluePrints.h:79
std::shared_ptr< ge::PipelineElementBlueprint > const & findCompositionIDbyName(std::string _name)
Definition: BluePrints.cpp:166
double farplane
Definition: BluePrints.h:35
std::vector< std::shared_ptr< ge::AnimationPathBlueprint > > animationPathBlueprints
Definition: BluePrints.h:128
bool orthographic
Definition: BluePrints.h:45
std::vector< std::shared_ptr< PipelineElementBlueprint > > pipelineElementsBlueprints
Definition: BluePrints.h:73
Blueprint()
Definition: BluePrints.h:122
vmml::Vector2f coordinates
Definition: BluePrints.h:28
std::shared_ptr< ge::ShaderBlueprint > shaderObj
Definition: BluePrints.h:67
vmml::Vector3f clearColor
Definition: BluePrints.h:68
vmml::Vector3d pos
Definition: BluePrints.h:37
bool clusteredVectorMapRenderingOn
Definition: BluePrints.h:109
std::string name
Definition: BluePrints.h:66
std::shared_ptr< ge::WindowBlueprint > readWindowFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:26
vmml::Vector3f pickingColor
Definition: BluePrints.h:106
Definition: BluePrints.h:71
std::shared_ptr< ge::EngineBlueprint > engineBlueprint
Definition: BluePrints.h:123
bool isGeneric
Definition: BluePrints.h:57
enum ge::Camera::CAMERATYPE camtype
Definition: BluePrints.h:38
double time
Definition: BluePrints.h:22
Definition: BluePrints.h:32
std::string orientation
Definition: BluePrints.h:42
std::shared_ptr< ge::PipelineElementBlueprint > readPipelineElementFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:149
std::shared_ptr< ge::ShaderBlueprint > readShaderFromJSONElement(const Jzon::Node &_config, std::string _elementName="shader")
Definition: BluePrints.cpp:50
vmml::Vector3d scale
Definition: BluePrints.h:84
vmml::Vector2i extent
Definition: BluePrints.h:29
std::vector< std::shared_ptr< ShaderBlueprint > > shaderblueprints
Definition: BluePrints.h:100
static std::shared_ptr< ge::ShaderBlueprint > readShaderContentFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:66
vmml::Vector2f pickingOffset
Definition: BluePrints.h:107
std::vector< std::string > defines
Definition: BluePrints.h:59
vmml::Vector2d viewportSize
Definition: BluePrints.h:43
std::string url
Definition: BluePrints.h:91
std::string format
Definition: BluePrints.h:81
Definition: BluePrints.h:51
std::string type
Definition: BluePrints.h:65
vmml::Vector3d pos
Definition: BluePrints.h:83
Definition: BluePrints.h:63
Definition: BluePrints.h:26
std::vector< std::shared_ptr< SkyboxBlueprint > > skyboxBlueprint
Definition: BluePrints.h:102
std::vector< int > definesValues
Definition: BluePrints.h:60
std::vector< std::shared_ptr< CameraBlueprint > > camerablueprints
Definition: BluePrints.h:101
std::string name
Definition: BluePrints.h:47
std::shared_ptr< ge::CameraBlueprint > readCameraFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:94
void readEngineConfigFromJSON(const Jzon::Node &_config)
Definition: BluePrints.cpp:6
std::shared_ptr< ge::SkyboxBlueprint > readSkyboxFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:33
ShaderBlueprint(std::string _name)
Definition: BluePrints.h:54
std::shared_ptr< ge::AnimationPathBlueprint > getAnimationPathFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:177
std::string abspath
Definition: BluePrints.h:145
bool superSamplingRenderingOn
Definition: BluePrints.h:110
double pitch
Definition: BluePrints.h:40
std::string file
Definition: BluePrints.h:56
std::shared_ptr< ShaderBlueprint > shader
Definition: BluePrints.h:82
std::shared_ptr< ge::WindowBlueprint > windowBlueprint
Definition: BluePrints.h:126
std::string typeString
Definition: BluePrints.h:48
Definition: BluePrints.h:113
double superSamplingFactor
Definition: BluePrints.h:46
double heading
Definition: BluePrints.h:41
std::string repourl
Definition: BluePrints.h:80
Definition: BluePrints.h:95
std::string type
Definition: BluePrints.h:90
vmml::Vector4d orthoCoord
Definition: BluePrints.h:44
std::string gpuprogrampath
Definition: BluePrints.h:97
Definition: AvalancheTrainingSimulationEngine.h:28
double nearplane
Definition: BluePrints.h:34
Definition: BluePrints.h:19
CAMERATYPE
Definition: Camera.h:21
GLuint pixelCount
Definition: BluePrints.h:92
ShaderBlueprint()
Definition: BluePrints.h:53
std::vector< vmml::Vector3d > controlpoints
Definition: BluePrints.h:23
Definition: BluePrints.h:119
~Blueprint()
Definition: BluePrints.h:123
static Jzon::Node readAConfigFromJSON(std::string _configFile)
Definition: BluePrints.cpp:191
std::string name
Definition: BluePrints.h:89
std::string animatedObject
Definition: BluePrints.h:21
std::string name
Definition: BluePrints.h:115
std::shared_ptr< ge::PipelineBlueprint > pipelineBlueprint
Definition: BluePrints.h:103
std::string shaderpath
Definition: BluePrints.h:98
std::string name
Definition: BluePrints.h:55
Definition: BluePrints.h:77