From 5b1ab8b69260728984d12ef17bf03e9710476d62 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 5 May 2015 14:10:37 +0200 Subject: [PATCH] Fix crash when changing coordinate system origin to Pluto --- src/rendering/renderengine.cpp | 70 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 931abeecfb..2a8bd2a963 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -979,7 +979,7 @@ void RenderEngine::changeViewPoint(std::string origin) { SceneGraphNode* jupiterBarycenterNode = scene()->sceneGraphNode("JupiterBarycenter"); - SceneGraphNode* newHorizonsGhostNode = scene()->sceneGraphNode("NewHorizonsGhost"); + //SceneGraphNode* newHorizonsGhostNode = scene()->sceneGraphNode("NewHorizonsGhost"); //SceneGraphNode* dawnNode = scene()->sceneGraphNode("Dawn"); //SceneGraphNode* vestaNode = scene()->sceneGraphNode("Vesta"); @@ -998,7 +998,7 @@ void RenderEngine::changeViewPoint(std::string origin) { solarSystemBarycenterNode->setParent(plutoBarycenterNode); newHorizonsNode->setParent(plutoBarycenterNode); - newHorizonsGhostNode->setParent(plutoBarycenterNode); + //newHorizonsGhostNode->setParent(plutoBarycenterNode); //dawnNode->setParent(plutoBarycenterNode); //vestaNode->setParent(plutoBarycenterNode); @@ -1058,16 +1058,16 @@ void RenderEngine::changeViewPoint(std::string origin) { //vestaNode->setEphemeris(new SpiceEphemeris(vestaDictionary)); - ghoul::Dictionary newHorizonsGhostDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("NEW HORIZONS") }, - { std::string("EphmerisGhosting"), std::string("TRUE") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("PLUTO BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary)); + //ghoul::Dictionary newHorizonsGhostDictionary = + //{ + // { std::string("Type"), std::string("Spice") }, + // { std::string("Body"), std::string("NEW HORIZONS") }, + // { std::string("EphmerisGhosting"), std::string("TRUE") }, + // { std::string("Reference"), std::string("GALACTIC") }, + // { std::string("Observer"), std::string("PLUTO BARYCENTER") }, + // { std::string("Kernels"), ghoul::Dictionary() } + //}; + //newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary)); return; } @@ -1077,7 +1077,7 @@ void RenderEngine::changeViewPoint(std::string origin) { plutoBarycenterNode->setParent(solarSystemBarycenterNode); jupiterBarycenterNode->setParent(solarSystemBarycenterNode); newHorizonsNode->setParent(solarSystemBarycenterNode); - newHorizonsGhostNode->setParent(solarSystemBarycenterNode); + //newHorizonsGhostNode->setParent(solarSystemBarycenterNode); //newHorizonsTrailNode->setParent(solarSystemBarycenterNode); //dawnNode->setParent(solarSystemBarycenterNode); @@ -1137,16 +1137,16 @@ void RenderEngine::changeViewPoint(std::string origin) { //vestaNode->setEphemeris(new SpiceEphemeris(vestaDictionary)); - ghoul::Dictionary newHorizonsGhostDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("NEW HORIZONS") }, - { std::string("EphmerisGhosting"), std::string("TRUE") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("JUPITER BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary)); + //ghoul::Dictionary newHorizonsGhostDictionary = + //{ + // { std::string("Type"), std::string("Spice") }, + // { std::string("Body"), std::string("NEW HORIZONS") }, + // { std::string("EphmerisGhosting"), std::string("TRUE") }, + // { std::string("Reference"), std::string("GALACTIC") }, + // { std::string("Observer"), std::string("JUPITER BARYCENTER") }, + // { std::string("Kernels"), ghoul::Dictionary() } + //}; + //newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary)); return; } @@ -1191,7 +1191,7 @@ void RenderEngine::changeViewPoint(std::string origin) { solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - newHorizonsGhostNode->setParent(jupiterBarycenterNode); + //newHorizonsGhostNode->setParent(jupiterBarycenterNode); //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); @@ -1217,17 +1217,17 @@ void RenderEngine::changeViewPoint(std::string origin) { - ghoul::Dictionary newHorizonsGhostDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("NEW HORIZONS") }, - { std::string("EphmerisGhosting"), std::string("TRUE") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("JUPITER BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary)); - newHorizonsGhostNode->setParent(jupiterBarycenterNode); + //ghoul::Dictionary newHorizonsGhostDictionary = + //{ + // { std::string("Type"), std::string("Spice") }, + // { std::string("Body"), std::string("NEW HORIZONS") }, + // { std::string("EphmerisGhosting"), std::string("TRUE") }, + // { std::string("Reference"), std::string("GALACTIC") }, + // { std::string("Observer"), std::string("JUPITER BARYCENTER") }, + // { std::string("Kernels"), ghoul::Dictionary() } + //}; + //newHorizonsGhostNode->setEphemeris(new SpiceEphemeris(newHorizonsGhostDictionary)); + //newHorizonsGhostNode->setParent(jupiterBarycenterNode); return;