diff --git a/data/scene/osirisrex/osirisrex/osirisrex.mod b/data/scene/osirisrex/osirisrex/osirisrex.mod index 57988b5c16..2bb0160374 100644 --- a/data/scene/osirisrex/osirisrex/osirisrex.mod +++ b/data/scene/osirisrex/osirisrex/osirisrex.mod @@ -40,8 +40,67 @@ return { GuiName = "/Solar/OsirisRex" }, + { + Name = "ORX_OCAMS_POLYCAM", + Parent = "OsirisRex", + Renderable = { + Type = "RenderableModel", + Body = "OSIRIS-REX", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = "models/Osiris.obj", + Magnification = 0, + }, + Textures = { + Type = "simple", + Color = "textures/osirisTex.png", + }, + Shading = { + PerformShading = true, + Fadeable = false, + Ghosting = false, + }, + }, + Ephemeris = { + Type = "Spice", + Body = "OSIRIS-REX", + -- Reference = "ECLIPJ2000", + Reference = "GALACTIC", + Observer = BENNU_BODY, + }, + Rotation = { + Source = "ORX_SPACECRAFT", + Destination = "GALACTIC" + }, + + GuiName = "/Solar/OsirisRex" + }, + { - Name = "OsirisRexPath", + Name = "OsirisRexPathSolar", + Parent = "SolarSystemBarycenter", + Renderable = { + Type = "RenderablePath", + Body = "OSIRIS-REX", + Frame = "GALACTIC", + Observer = "SUN", + RGB = { 0.0, 1.0, 0.5}, + TimeSteps = 86400, -- Number of seconds in a day + PointSteps = 10, -- Every 10 days + Textures = { + Type = "simple", + Color = "textures/glare_blue.png", + -- need to add different texture + }, + DrawLine = true, + + StartTime = "2016 SEP 8 12:00:00", + EndTime = "2023 SEP 24 12:00:00" + }, + GuiName = "/Solar/OsirisRexPathSolar" + }, + { + Name = "OsirisRexPathLocal", Parent = "Bennu2", Renderable = { Type = "RenderablePath", @@ -61,6 +120,6 @@ return { StartTime = "2016 SEP 8 12:00:00", EndTime = "2023 SEP 24 12:00:00" }, - GuiName = "/Solar/OsirisRexTrail" + GuiName = "/Solar/OsirisRexPathLocal" }, } diff --git a/modules/base/rendering/renderablepath.cpp b/modules/base/rendering/renderablepath.cpp index 554d03ae7c..7f1c2370e8 100644 --- a/modules/base/rendering/renderablepath.cpp +++ b/modules/base/rendering/renderablepath.cpp @@ -51,6 +51,7 @@ namespace { const std::string keyTimeSteps = "TimeSteps"; const std::string keyPointSteps = "PointSteps"; const std::string keyDrawLine = "DrawLine"; + const std::string keRenderDistanceInterval = "RenderDistanceInterval"; } @@ -74,8 +75,10 @@ RenderablePath::RenderablePath(const ghoul::Dictionary& dictionary) _successfullDictionaryFetch &= dictionary.getValue(keyFrame, _frame); _successfullDictionaryFetch &= dictionary.getValue(keyTimeSteps, _increment); - if (!dictionary.getValue(keyPointSteps, _pointSteps)) - _pointSteps = 4; + float fPointSteps; // Dictionary can not pick out ints... + if (!dictionary.getValue(keyPointSteps, fPointSteps)) + fPointSteps = 4; + _pointSteps = fPointSteps; glm::vec3 color(0.f); if (dictionary.hasKeyAndValue(keyColor)) diff --git a/src/interaction/interactionhandler.cpp b/src/interaction/interactionhandler.cpp index 6f6149222e..8b9cf6038a 100644 --- a/src/interaction/interactionhandler.cpp +++ b/src/interaction/interactionhandler.cpp @@ -790,6 +790,7 @@ void InteractionHandler::postSynchronizationPreDraw() { } else { _currentInteractionMode->updateCameraStateFromMouseStates(*_camera); + _camera->setFocusPositionVec3(focusNode()->worldPosition()); } } diff --git a/src/util/camera.cpp b/src/util/camera.cpp index e081948290..f03bc6856b 100644 --- a/src/util/camera.cpp +++ b/src/util/camera.cpp @@ -80,11 +80,6 @@ namespace openspace { void Camera::setFocusPositionVec3(Vec3 pos) { std::lock_guard _lock(_mutex); _focusPosition = pos; - - _cachedViewDirection.isDirty = true; - _cachedLookupVector.isDirty = true; - _cachedViewRotationMatrix.isDirty = true; - _cachedCombinedViewMatrix.isDirty = true; } void Camera::setRotation(Quat rotation) {