Allow the disabling of ISWA components

This commit is contained in:
Alexander Bock
2016-06-02 13:25:05 +02:00
parent 1e8d329e3d
commit 4c679c15ea
4 changed files with 19 additions and 4 deletions

View File

@@ -27,11 +27,16 @@
#include <ghoul/designpattern/singleton.h>
#include <ghoul/glm.h>
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
#include <ccmc/Kameleon.h>
#endif
#include <set>
namespace openspace {
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
class ccmc::Kameleon;
#endif
class TransformationManager : public ghoul::Singleton<TransformationManager> {
friend class ghoul::Singleton<TransformationManager>;
@@ -42,7 +47,9 @@ public:
glm::dmat3 frameTransformationMatrix(std::string from, std::string to, double ephemerisTime) const;
private:
std::shared_ptr<ccmc::Kameleon> _kameleon;
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
std::shared_ptr<ccmc::Kameleon> _kameleon;
#endif
std::set<std::string> _kameleonFrames;
std::set<std::string> _dipoleFrames;
};

View File

@@ -31,7 +31,9 @@
#include <map>
#include <future>
#include <ghoul/glm.h>
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
#include <ccmc/Kameleon.h>
#endif
#include <openspace/engine/downloadmanager.h>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <openspace/rendering/renderable.h>

View File

@@ -116,6 +116,7 @@ void GuiIswaComponent::render() {
}
}
#ifdef OPENSPACE_MODULE_ISWA_ENABLED
if(ImGui::CollapsingHeader("Cdf files")){
auto cdfInfo = IswaManager::ref().cdfInformation();
@@ -151,6 +152,7 @@ void GuiIswaComponent::render() {
}
}
}
#endif
for (const auto& p : _propertiesByOwner) {
if (ImGui::CollapsingHeader(p.first.c_str())) {
@@ -209,6 +211,7 @@ void GuiIswaComponent::render() {
}
#ifdef OPENSPACE_MODULE_ISWA_ENABLED
if (ImGui::CollapsingHeader("iSWA screen space cygntes")) {
auto map = IswaManager::ref().cygnetInformation();
@@ -237,7 +240,8 @@ void GuiIswaComponent::render() {
}
}
#endif
ImGui::End();
}

View File

@@ -45,13 +45,16 @@
}
TransformationManager::~TransformationManager(){
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
_kameleon = nullptr;
#endif
}
glm::dmat3 TransformationManager::frameTransformationMatrix(std::string from,
std::string to,
double ephemerisTime) const
{
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
auto fromit = _dipoleFrames.find(from);
auto toit = _dipoleFrames.find(to);
@@ -77,7 +80,6 @@
return SpiceManager::ref().frameTransformationMatrix(from, to, ephemerisTime);
}
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
if(fromKameleon && toKameleon){
_kameleon->_cxform(from.c_str(), to.c_str(), ephemerisTime, &in0, &out0);
_kameleon->_cxform(from.c_str(), to.c_str(), ephemerisTime, &in1, &out1);