From bae8d0aa76b0c9fc1359b11acc57781f1b4493ff Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 14 Jan 2016 16:05:29 +0100 Subject: [PATCH] Making OpenSpaceTest application compile with API change Set default start to July 2015 Move default window out of the corner Compile fixes --- config/sgct/single.xml | 2 +- modules/base/rendering/renderabletrail.cpp | 20 ++++++++++++-------- openspace.cfg | 4 ++-- scripts/default_startup.lua | 4 ++-- src/util/screenlog.cpp | 2 ++ tests/main.cpp | 4 ++-- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/config/sgct/single.xml b/config/sgct/single.xml index 6e24842b3e..324905d0d1 100644 --- a/config/sgct/single.xml +++ b/config/sgct/single.xml @@ -14,7 +14,7 @@ - + diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 3fac3615eb..8741821816 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -284,6 +284,7 @@ void RenderableTrail::fullYearSweep(double time) { _vertexArray.resize(segments+2); glm::dvec3 p; + bool failed = false; for (int i = 0; i < segments+2; i++) { if (start > time && intervalSet) { time = start; @@ -292,14 +293,17 @@ void RenderableTrail::fullYearSweep(double time) { time = end; } - try { - p = - SpiceManager::ref().targetPosition(_target, _observer, _frame, {}, time, lightTime); - } - catch (const SpiceManager::SpiceException& e) { - // This fires for PLUTO BARYCENTER and SUN and uses the only value sometimes? - // ---abock - LERROR(e.what()); + if (!failed || intervalSet) { + try { + p = + SpiceManager::ref().targetPosition(_target, _observer, _frame, {}, time, lightTime); + } + catch (const SpiceManager::SpiceException& e) { + // This fires for PLUTO BARYCENTER and SUN and uses the only value sometimes? + // ---abock + LERROR(e.what()); + failed = true; + } } psc pscPos = PowerScaledCoordinate::CreatePowerScaledCoordinate(p.x, p.y, p.z); diff --git a/openspace.cfg b/openspace.cfg index cad9aaf1f8..c418ed428b 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -7,7 +7,7 @@ return { -- Sets the scene that is to be loaded by OpenSpace. A scene file is a description -- of all entities that will be visible during an instance of OpenSpace - Scene = "${SCENE}/default.scene", + Scene = "${SCENE}/default_nh.scene", Paths = { SGCT = "${BASE_PATH}/config/sgct", @@ -55,5 +55,5 @@ return { File = "${BASE_PATH}/Properties.txt" }, DownloadRequestURL = "http://openspace.itn.liu.se/request.cgi", - -- RenderingMethod = "ABufferFrameBuffer" + --RenderingMethod = "ABufferFrameBuffer" } \ No newline at end of file diff --git a/scripts/default_startup.lua b/scripts/default_startup.lua index a6ce0fb9cd..dea47a83fd 100644 --- a/scripts/default_startup.lua +++ b/scripts/default_startup.lua @@ -5,7 +5,7 @@ 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("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 @@ -13,7 +13,7 @@ openspace.time.setTime("2007 FEB 27 16:30:00") -- This is the start tim --TESTING ALICE --openspace.time.setTime("2015-07-13T00:00:00.00") ---openspace.time.setTime("2015-07-14T10:00:00.00") +openspace.time.setTime("2015-07-14T10:00:00.00") openspace.time.setDeltaTime(0) -- How many seconds pass per second of realtime, changeable in the GUI diff --git a/src/util/screenlog.cpp b/src/util/screenlog.cpp index 7fe112a693..a85634d3ab 100644 --- a/src/util/screenlog.cpp +++ b/src/util/screenlog.cpp @@ -24,6 +24,8 @@ #include +#include + using std::string; namespace openspace { diff --git a/tests/main.cpp b/tests/main.cpp index 49486c529c..ddc89f6e27 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -36,7 +36,7 @@ //#include //#include #include -#include +#include #include #include #include @@ -53,7 +53,7 @@ namespace { int main(int argc, char** argv) { std::vector args; - openspace::OpenSpaceEngine::create(argc, argv, std::make_unique(), args); + openspace::OpenSpaceEngine::create(argc, argv, std::make_unique(), args); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS();