mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-20 19:21:00 -06:00
Move read volumes logic to dataloadermodule and dir-is-read
This commit is contained in:
committed by
Matthias Berg
parent
bd334fd201
commit
e1775121f7
@@ -35,9 +35,42 @@ namespace {
|
||||
constexpr const char* _loggerCat = "DataLoaderModule";
|
||||
}
|
||||
|
||||
namespace {
|
||||
static const openspace::properties::Property::PropertyInfo ShowInternalVolumesInfo = {
|
||||
"ShowInternalVolumesTrigger",
|
||||
"Trigger load volume data files",
|
||||
"If this property is triggered it will call the function to load and show volume data"
|
||||
};
|
||||
|
||||
static const openspace::properties::Property::PropertyInfo VolumesInfo = {
|
||||
"Volumes",
|
||||
"List of volume items stored internally and ready to load",
|
||||
"This list contains names of volume data files converted from the CDF format"
|
||||
};
|
||||
|
||||
static const openspace::properties::Property::PropertyInfo FieldlinesInfo = {
|
||||
"Fieldlines",
|
||||
"List of fieldline items stored internally and ready to load",
|
||||
"This list contains names of fieldline data files converted from the CDF format"
|
||||
};
|
||||
}
|
||||
|
||||
namespace openspace {
|
||||
|
||||
DataLoaderModule::DataLoaderModule() : OpenSpaceModule(Name) {}
|
||||
DataLoaderModule::DataLoaderModule()
|
||||
: OpenSpaceModule(Name)
|
||||
, _showInternalVolumesTrigger(ShowInternalVolumesInfo)
|
||||
, _volumeDataItems(VolumesInfo)
|
||||
{
|
||||
_showInternalVolumesTrigger.onChange([this](){
|
||||
// showInternalDataType(DataTypes.volume);
|
||||
validateDataDirectory();
|
||||
_loader->createInternalDataItemProperties();
|
||||
});
|
||||
|
||||
addProperty(_volumeDataItems);
|
||||
addProperty(_showInternalVolumesTrigger);
|
||||
}
|
||||
|
||||
DataLoaderModule::~DataLoaderModule() {}
|
||||
|
||||
@@ -56,7 +89,9 @@ void DataLoaderModule::setDataDirectoryRead(bool isRead) {
|
||||
}
|
||||
|
||||
void DataLoaderModule::validateDataDirectory() {
|
||||
if(!_dataDirectoryIsRead) {
|
||||
if(_dataDirectoryIsRead == false) {
|
||||
|
||||
// TODO: generalize
|
||||
_reader->readVolumeDataItems();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user