9 #ifndef GlobeEngine_FlowDataBlueprint_h
10 #define GlobeEngine_FlowDataBlueprint_h
12 #include <vmmlib/vmmlib.hpp>
34 std::shared_ptr<ge::ShaderBlueprint>
shader;
39 std::shared_ptr<ge::ShaderBlueprint>
shader;
44 std::shared_ptr<ge::ShaderBlueprint>
shader;
56 static std::vector<std::string> getStringfieldFromNode(
const Jzon::Node& _node)
58 std::vector<std::string> resVec;
60 for (Jzon::Node::const_iterator it = _node.begin(); it != _node.end(); ++it) {
61 resVec.push_back(it->second.toString());
67 static ClimateDataVariable getClimateDataVariable(
const Jzon::Node& _config) {
68 ClimateDataVariable res;
69 res.
name = _config.get(
"name").toString();
70 res.animationIntervall = _config.get(
"animationIntervall").toDouble();
71 res.timestepsToLoad = _config.get(
"timesteps").toInt();
72 res.variables = geFlow::getStringfieldFromNode(_config.get(
"vars"));
73 res.ordering = geFlow::getStringfieldFromNode(_config.get(
"orderInNetCDF"));
77 static ArrowFieldInfo getArrowFieldFromJSON(
const Jzon::Node& _config) {
79 res.
arrowlength = _config.get(
"arrowlenght").toDouble();
81 res.ncinfo = geFlow::getClimateDataVariable(_config);
85 static AnimatedTextureInfo getAnimatedTextureFromJSON(
const Jzon::Node& _config) {
86 AnimatedTextureInfo res;
87 res.
ncinfo = geFlow::getClimateDataVariable(_config);
92 static VolumeInfo getVolumeInfoFromJSON(
const Jzon::Node& _config) {
94 res.
ncinfo = geFlow::getClimateDataVariable(_config);
99 static std::shared_ptr<geFlow::WeatherDataLoadingInfo> getWeatherLoadingInfoFromJSONElement(
const Jzon::Node& _config) {
100 std::shared_ptr<geFlow::WeatherDataLoadingInfo> res = std::make_shared<WeatherDataLoadingInfo>();
101 res->fileName = _config.get(
"url").toString();
103 res->gridInfo.push_back(_config.get(
"grid").get(
"longitude").toString());
104 res->gridInfo.push_back(_config.get(
"grid").get(
"latitude").toString());
105 if (_config.get(
"grid").get(
"height")) {
106 res->gridInfo.push_back(_config.get(
"grid").get(
"height").toString());
108 if (_config.get(
"grid").get(
"time")) {
109 res->gridInfo.push_back(_config.get(
"grid").get(
"time").toString());
112 if (_config.get(
"arrowfield")) {
113 res->arrowFieldInfos.push_back(geFlow::getArrowFieldFromJSON(_config.get(
"arrowfield")));
116 if (_config.get(
"texture")) {
117 res->animatedTextureInfos.push_back(geFlow::getAnimatedTextureFromJSON(_config.get(
"texture")));
121 if (_config.get(
"volume")) {
122 res->volumeInfos.push_back(geFlow::getVolumeInfoFromJSON(_config.get(
"volume")));
std::vector< AnimatedTextureInfo > animatedTextureInfos
Definition: FlowDataBlueprint.h:52
std::string fileName
Definition: FlowDataBlueprint.h:49
Definition: FlowDataBlueprint.h:32
Definition: FlowDataBlueprint.h:19
std::vector< std::string > gridInfo
Definition: FlowDataBlueprint.h:50
std::shared_ptr< ge::ShaderBlueprint > shader
Definition: FlowDataBlueprint.h:44
ClimateDataVariable ncinfo
Definition: FlowDataBlueprint.h:35
std::string name
Definition: FlowDataBlueprint.h:25
ClimateDataVariable ncinfo
Definition: FlowDataBlueprint.h:40
std::vector< ArrowFieldInfo > arrowFieldInfos
Definition: FlowDataBlueprint.h:51
Definition: ArrowField.h:16
std::vector< std::string > variables
Definition: FlowDataBlueprint.h:28
std::vector< size_t > start
Definition: FlowDataBlueprint.h:20
Definition: FlowDataBlueprint.h:24
std::vector< VolumeInfo > volumeInfos
Definition: FlowDataBlueprint.h:53
std::vector< size_t > count
Definition: FlowDataBlueprint.h:21
static std::shared_ptr< ge::ShaderBlueprint > readShaderContentFromJSONElement(const Jzon::Node &_config)
Definition: BluePrints.cpp:66
Definition: FlowDataBlueprint.h:48
std::vector< std::string > ordering
Definition: FlowDataBlueprint.h:29
Definition: FlowDataBlueprint.h:43
double arrowlength
Definition: FlowDataBlueprint.h:33
Definition: FlowDataBlueprint.h:38
std::shared_ptr< ge::ShaderBlueprint > shader
Definition: FlowDataBlueprint.h:34
int timestepsToLoad
Definition: FlowDataBlueprint.h:26
ClimateDataVariable ncinfo
Definition: FlowDataBlueprint.h:45
std::shared_ptr< ge::ShaderBlueprint > shader
Definition: FlowDataBlueprint.h:39
double animationIntervall
Definition: FlowDataBlueprint.h:27