mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 11:18:22 -05:00
Merge branch 'feature/iSWA' of github.com:OpenSpace/OpenSpace-Development into feature/iSWA
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user