From 8fbd027a1ecb0e05e75581494ccfd92dccc37955 Mon Sep 17 00:00:00 2001 From: Anton Arbring Date: Thu, 25 Jun 2015 20:28:36 -0400 Subject: [PATCH] Adding convenient scripts for showing 67P and changing coordinate system to 67P --- scripts/bind_keys.lua | 18 ++++++++++++++++- scripts/default_settings.lua | 1 + scripts/default_startup.lua | 3 +++ src/rendering/renderengine.cpp | 35 ++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/scripts/bind_keys.lua b/scripts/bind_keys.lua index 63a4b18286..c72e06c737 100644 --- a/scripts/bind_keys.lua +++ b/scripts/bind_keys.lua @@ -22,7 +22,23 @@ openspace.bindKey("5", "openspace.time.setDeltaTime(60)") openspace.bindKey("6", "openspace.time.setDeltaTime(120)") openspace.bindKey("7", "openspace.time.setDeltaTime(360)") openspace.bindKey("8", "openspace.time.setDeltaTime(540)") -openspace.bindKey("9", "openspace.time.setDeltaTime(720)") +openspace.bindKey("9", "openspace.time.setDeltaTime(720)") + +--[[openspace.bindKey("2", "openspace.time.setDeltaTime(30)") +openspace.bindKey("3", "openspace.time.setDeltaTime(180)") -- 3m +openspace.bindKey("4", "openspace.time.setDeltaTime(900)") -- 15m +openspace.bindKey("5", "openspace.time.setDeltaTime(3600)") -- 1h +openspace.bindKey("6", "openspace.time.setDeltaTime(14400)") -- 3h +openspace.bindKey("7", "openspace.time.setDeltaTime(43200)") -- 12h +openspace.bindKey("8", "openspace.time.setDeltaTime(86400)") -- 1d +openspace.bindKey("9", "openspace.time.setDeltaTime(172800)") -- 2d + +openspace.bindKey("v", "openspace.time.setTime('2014 AUG 22 03:45:00'); openspace.time.setDeltaTime(1);") +openspace.bindKey("b", "openspace.time.setTime('2014 SEP 02 11:30:30'); openspace.time.setDeltaTime(1);") +openspace.bindKey("n", "openspace.time.setTime('2014 SEP 14 17:55:00'); openspace.time.setDeltaTime(1);") + +openspace.bindKey("i", "local b = openspace.getPropertyValue('ImagePlaneRosetta.renderable.enabled'); openspace.setPropertyValue('ImagePlaneRosetta.renderable.enabled', not b)") +--]] openspace.bindKey("F8", "openspace.time.setTime('2015-07-14T09:00:00.00'); openspace.setPropertyValue('PlutoProjection.renderable.clearAllProjections', true); openspace.setPropertyValue('Charon.renderable.clearAllProjections', true);") diff --git a/scripts/default_settings.lua b/scripts/default_settings.lua index 0f3f2ffcb1..1e76452e7d 100644 --- a/scripts/default_settings.lua +++ b/scripts/default_settings.lua @@ -14,5 +14,6 @@ openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.75) openspace.setPropertyValue("MilkyWay.renderable.segments", 50) openspace.changeCoordinateSystem("Jupiter") +--openspace.changeCoordinateSystem("67P") openspace.printInfo("Done setting default values") diff --git a/scripts/default_startup.lua b/scripts/default_startup.lua index 75eaa06d73..6b7cbadcf2 100644 --- a/scripts/default_startup.lua +++ b/scripts/default_startup.lua @@ -6,6 +6,9 @@ openspace.setInvertRoll(true); --openspace.setInteractionSensitivity(10) -- This is the default value for the sensitivity (the higher, the more sensitive) openspace.time.setTime("2007 FEB 27 16:30:00") -- This is the start time for a Jupiter run of New Horizons + +--openspace.time.setTime("2011 AUG 06 00:00:00") -- Dawn takes pictures of Vesta +--openspace.time.setTime("2011 JUL 28 12:00:00") -- Rosetta starts dancing around 67p --openspace.time.setTime("2007 FEB 28 11:45:00") -- europa rise --TESTING ALICE --openspace.time.setTime("2015-07-13T00:00:00.00") diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 75e1f7ed9a..0a761ee744 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -1236,6 +1236,41 @@ void RenderEngine::changeViewPoint(std::string origin) { // return; //} + //if (origin == "67P") { + // SceneGraphNode* rosettaNode = scene()->sceneGraphNode("Rosetta"); + // SceneGraphNode* cgNode = scene()->sceneGraphNode("67P"); + // //jupiterBarycenterNode->setParent(solarSystemBarycenterNode); + // //plutoBarycenterNode->setParent(solarSystemBarycenterNode); + // solarSystemBarycenterNode->setParent(cgNode); + // rosettaNode->setParent(cgNode); + // + // ghoul::Dictionary solarDictionary = + // { + // { std::string("Type"), std::string("Spice") }, + // { std::string("Body"), std::string("SUN") }, + // { std::string("Reference"), std::string("GALACTIC") }, + // { std::string("Observer"), std::string("CHURYUMOV-GERASIMENKO") }, + // { std::string("Kernels"), ghoul::Dictionary() } + // }; + // solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); + // + // ghoul::Dictionary rosettaDictionary = + // { + // { std::string("Type"), std::string("Spice") }, + // { std::string("Body"), std::string("ROSETTA") }, + // { std::string("Reference"), std::string("GALACTIC") }, + // { std::string("Observer"), std::string("CHURYUMOV-GERASIMENKO") }, + // { std::string("Kernels"), ghoul::Dictionary() } + // }; + // + // cgNode->setParent(scene()->sceneGraphNode("SolarSystem")); + // rosettaNode->setEphemeris(new SpiceEphemeris(rosettaDictionary)); + // cgNode->setEphemeris(new StaticEphemeris); + // + // return; + // + //} + ghoul_assert(false, "This function is being misused"); }