Merge branch 'feature/iSWA' of github.com:OpenSpace/OpenSpace-Development into feature/iSWA

This commit is contained in:
Sebastian Piwell
2016-05-19 14:05:18 -04:00
2 changed files with 24 additions and 8 deletions
+11 -8
View File
@@ -443,15 +443,18 @@ void KameleonPlane::readFieldlinePaths(std::string indexFile){
fileContent += line;
}
//Parse and add each fieldline as an selection
json fieldlines = json::parse(fileContent);
int i = 0;
for (json::iterator it = fieldlines.begin(); it != fieldlines.end(); ++it) {
_fieldlines.addOption({i, it.key()});
_fieldlineState[i] = std::make_tuple(it.key(), it.value(), false);
i++;
try{
//Parse and add each fieldline as an selection
json fieldlines = json::parse(fileContent);
int i = 0;
for (json::iterator it = fieldlines.begin(); it != fieldlines.end(); ++it) {
_fieldlines.addOption({i, it.key()});
_fieldlineState[i] = std::make_tuple(it.key(), it.value(), false);
i++;
}
} catch(const std::exception& e) {
LERROR("Error when reading json file with paths to seedpoints: " + std::string(e.what()));
}
// _fieldlines.setValue(std::vector<int>(1,0));
}
}
+13
View File
@@ -45,7 +45,20 @@
virtual bool readyToRender() override;
virtual void setUniformAndTextures() override;
virtual bool createShader() override;
/**
* Given a path to the json index of seedpoints file, this
* method reads, parses and adds them as checkbox options
* in the _fieldlines SelectionProperty
*
* @param indexFile Path to json index file
*/
void readFieldlinePaths(std::string indexFile);
/**
* Updates the _fieldlineState map to match the _fieldlines
* SelectionProperty and creates or removes fieldlines in the scene.
*/
void updateFieldlineSeeds();
void setTransferFunctions(std::string tfPath);