remove excess code

This commit is contained in:
Michael Nilsson
2016-05-24 16:51:02 -04:00
parent b8c093c411
commit e24944675e
4 changed files with 12 additions and 42 deletions
-1
View File
@@ -154,7 +154,6 @@ bool DataPlane::initialize(){
_dataOptions.onChange([this](){ loadTexture();} );
_transferFunctionsFile.onChange([this](){
LDEBUG(name() + " Event setTransferFunctionsFileChanged");
setTransferFunctions(_transferFunctionsFile.value());
});
-5
View File
@@ -151,11 +151,6 @@ bool DataSphere::initialize(){
setTransferFunctions(_transferFunctionsFile.value());
});
_transferFunctionsFile.onChange([this](){
LDEBUG(name() + " Event setTransferFunctionsFileChanged");
setTransferFunctions(_transferFunctionsFile.value());
});
return true;
}
+1 -27
View File
@@ -66,33 +66,7 @@ IswaGroup::IswaGroup(std::string name, IswaManager::CygnetType type)
registerProperties();
}
IswaGroup::~IswaGroup(){
//_cygnets.clear();
}
// void IswaGroup::registerCygnet(IswaCygnet* cygnet, IswaManager::CygnetType type){
// if(_cygnets.empty()){
// _type = type;
// registerProperties();
// }
// if(type != _type){
// LWARNING("Can't register cygnet with a different type from the group");
// return;
// }
// if(type == IswaManager::CygnetType::Data){
// DataPlane* dataplane = static_cast<DataPlane*>(cygnet);
// dataplane->useLog(_useLog.value());
// dataplane->useHistogram(_useHistogram.value());
// dataplane->normValues(_normValues.value());
// dataplane->backgroundValues(_backgroundValues.value());
// dataplane->transferFunctionsFile(_transferFunctionsFile.value());
// dataplane->dataOptions(_dataOptions.value());
// }
// _cygnets.push_back(cygnet);
// }
IswaGroup::~IswaGroup(){}
void IswaGroup::registerOptions(const std::vector<properties::SelectionProperty::Option>& options){
if(!_registered)
+11 -9
View File
@@ -123,13 +123,20 @@ bool KameleonPlane::initialize(){
_kw = std::make_shared<KameleonWrapper>(absPath(_kwPath));
// IswaCygnet::initialize();
_textures.push_back(nullptr);
if(!_data->groupName.empty()){
_groupEvent = IswaManager::ref().groupEvent(_data->groupName, _type);
std::cout << "Register groupEvent: " << (_groupEvent != nullptr) << std::endl;
_group = IswaManager::ref().registerToGroup(_data->groupName, _type);
std::cout << "Register group " << (_group != nullptr) << std::endl;
//Subscribe to enable propert and delete
_groupEvent->subscribe(name(), "enabledChanged", [&](const ghoul::Dictionary& dict){
LDEBUG(name() + " Event enabledChanged");
_enabled.setValue(dict.value<bool>("enabled"));
});
_groupEvent->subscribe(name(), "clearGroup", [&](ghoul::Dictionary dict){
LDEBUG(name() + " Event clearGroup");
OsEng.scriptEngine().queueScript("openspace.removeSceneGraphNode('" + name() + "')");
});
}
initializeTime();
@@ -138,7 +145,7 @@ bool KameleonPlane::initialize(){
if(_group){
_dataProcessor = _group->dataProcessor();
_groupEvent->subscribe(name(), "useLogChanged", [&](const ghoul::Dictionary& dict){
LDEBUG(name() + " Event useLogChanged");
_useLog.setValue(dict.value<bool>("useLog"));
@@ -230,11 +237,6 @@ bool KameleonPlane::initialize(){
updateTexture();
});
_transferFunctionsFile.onChange([this](){
LDEBUG(name() + " Event setTransferFunctionsFileChanged");
setTransferFunctions(_transferFunctionsFile.value());
});
fillOptions();
updateTexture();