mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-16 00:41:18 -06:00
Allow the disabling of ISWA components
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user