From a688a1eee9bca82455d8fa24aec87d79d34728f2 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 26 Sep 2016 13:34:22 +0200 Subject: [PATCH] Rename Ephemeris to Translation --- .../scene/atmosphereearth/atmosphereearth.mod | 14 +- data/scene/earth/earth.mod | 2 +- data/scene/jupiter/callisto/callisto.mod | 2 +- data/scene/jupiter/europa/europa.mod | 2 +- data/scene/jupiter/ganymede/ganymede.mod | 2 +- data/scene/jupiter/io/io.mod | 2 +- data/scene/jupiter/jupiter/jupiter.mod | 4 +- data/scene/lodearth/lodearth.mod | 2 +- data/scene/lodmars/lodmars.mod | 2 +- data/scene/lodmercury/lodmercury.mod | 2 +- data/scene/lodmoon/lodmoon.mod | 2 +- data/scene/mars/mars.mod | 2 +- data/scene/mercury/mercury.mod | 2 +- data/scene/moon/moon.mod | 2 +- .../newhorizons/jupiter/callisto/callisto.mod | 4 +- .../newhorizons/jupiter/europa/europa.mod | 4 +- .../newhorizons/jupiter/ganymede/ganymede.mod | 4 +- data/scene/newhorizons/jupiter/io/io.mod | 4 +- .../newhorizons/jupiter/jupiter/jupiter.mod | 4 +- .../newhorizons/newhorizons/newhorizons.mod | 2 +- .../scene/newhorizons/pluto/charon/charon.mod | 4 +- data/scene/newhorizons/pluto/hydra/hydra.mod | 4 +- .../newhorizons/pluto/kerberos/kerberos.mod | 4 +- data/scene/newhorizons/pluto/nix/nix.mod | 2 +- data/scene/newhorizons/pluto/pluto/pluto.mod | 8 +- data/scene/newhorizons/pluto/styx/styx.mod | 4 +- data/scene/osirisrex/bennu/bennu.mod | 2 +- data/scene/osirisrex/osirisrex/osirisrex.mod | 6 +- data/scene/rosetta/67P/67P.mod | 2 +- data/scene/rosetta/rosetta/rosetta.mod | 4 +- data/scene/saturn/saturn.mod | 2 +- data/scene/uranus/uranus.mod | 2 +- include/openspace/scene/ephemeris.h | 6 +- include/openspace/scene/scenegraphnode.h | 8 +- modules/base/basemodule.cpp | 12 +- modules/base/ephemeris/spiceephemeris.cpp | 12 +- modules/base/ephemeris/spiceephemeris.h | 4 +- modules/base/ephemeris/staticephemeris.cpp | 16 +- modules/base/ephemeris/staticephemeris.h | 8 +- src/documentation/core_registration.cpp | 2 +- src/engine/openspaceengine.cpp | 4 +- src/rendering/renderengine.cpp | 770 +++++++++--------- src/scene/ephemeris.cpp | 26 +- src/scene/scenegraphnode.cpp | 26 +- 44 files changed, 502 insertions(+), 500 deletions(-) diff --git a/data/scene/atmosphereearth/atmosphereearth.mod b/data/scene/atmosphereearth/atmosphereearth.mod index f54904ac1f..656ae228b0 100644 --- a/data/scene/atmosphereearth/atmosphereearth.mod +++ b/data/scene/atmosphereearth/atmosphereearth.mod @@ -4,12 +4,14 @@ return { Name = "EarthBarycenter", Parent = "SolarSystemBarycenter", Static = true, - Ephemeris = { - Type = "Spice", - Body = "EARTH BARYCENTER", - Observer = "SUN", - Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" - }, + Transform = { + Translation = { + Type = "Spice", + Body = "EARTH BARYCENTER", + Observer = "SUN", + Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" + }, + } }, -- Earth module { diff --git a/data/scene/earth/earth.mod b/data/scene/earth/earth.mod index cda7130a76..2a20e2d275 100644 --- a/data/scene/earth/earth.mod +++ b/data/scene/earth/earth.mod @@ -31,7 +31,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "EARTH", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/jupiter/callisto/callisto.mod b/data/scene/jupiter/callisto/callisto.mod index 1af5b70f73..6e4a850cc8 100644 --- a/data/scene/jupiter/callisto/callisto.mod +++ b/data/scene/jupiter/callisto/callisto.mod @@ -24,7 +24,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "CALLISTO", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp" diff --git a/data/scene/jupiter/europa/europa.mod b/data/scene/jupiter/europa/europa.mod index 44c2ded0a5..e4dc06dcbc 100644 --- a/data/scene/jupiter/europa/europa.mod +++ b/data/scene/jupiter/europa/europa.mod @@ -24,7 +24,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "EUROPA", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp" diff --git a/data/scene/jupiter/ganymede/ganymede.mod b/data/scene/jupiter/ganymede/ganymede.mod index c31809f2be..9f699d122a 100644 --- a/data/scene/jupiter/ganymede/ganymede.mod +++ b/data/scene/jupiter/ganymede/ganymede.mod @@ -24,7 +24,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "GANYMEDE", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp" diff --git a/data/scene/jupiter/io/io.mod b/data/scene/jupiter/io/io.mod index ba04eb8c6d..97d00d47b3 100644 --- a/data/scene/jupiter/io/io.mod +++ b/data/scene/jupiter/io/io.mod @@ -24,7 +24,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "IO", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp" diff --git a/data/scene/jupiter/jupiter/jupiter.mod b/data/scene/jupiter/jupiter/jupiter.mod index 6d51c47314..70a4d65078 100644 --- a/data/scene/jupiter/jupiter/jupiter.mod +++ b/data/scene/jupiter/jupiter/jupiter.mod @@ -5,7 +5,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "JUPITER BARYCENTER", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" @@ -37,7 +37,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, 0, 0}, -- jupiter is at its barycenter }, Rotation = { diff --git a/data/scene/lodearth/lodearth.mod b/data/scene/lodearth/lodearth.mod index f7ca2e8291..c70e3f0233 100644 --- a/data/scene/lodearth/lodearth.mod +++ b/data/scene/lodearth/lodearth.mod @@ -6,7 +6,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "EARTH", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/lodmars/lodmars.mod b/data/scene/lodmars/lodmars.mod index dce7bf881b..f6e1bceb4c 100644 --- a/data/scene/lodmars/lodmars.mod +++ b/data/scene/lodmars/lodmars.mod @@ -6,7 +6,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "MARS BARYCENTER", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/lodmercury/lodmercury.mod b/data/scene/lodmercury/lodmercury.mod index f949495ff1..1bb59aea98 100644 --- a/data/scene/lodmercury/lodmercury.mod +++ b/data/scene/lodmercury/lodmercury.mod @@ -5,7 +5,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "MERCURY", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/lodmoon/lodmoon.mod b/data/scene/lodmoon/lodmoon.mod index d295f114f9..78980a943e 100644 --- a/data/scene/lodmoon/lodmoon.mod +++ b/data/scene/lodmoon/lodmoon.mod @@ -5,7 +5,7 @@ return { Parent = "EarthBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "MOON", Observer = "EARTH BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/mars/mars.mod b/data/scene/mars/mars.mod index 20dc40c5ea..e51dba4807 100644 --- a/data/scene/mars/mars.mod +++ b/data/scene/mars/mars.mod @@ -29,7 +29,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "MARS BARYCENTER", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/mercury/mercury.mod b/data/scene/mercury/mercury.mod index caacb59af8..ba64f42565 100644 --- a/data/scene/mercury/mercury.mod +++ b/data/scene/mercury/mercury.mod @@ -29,7 +29,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "MERCURY", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/moon/moon.mod b/data/scene/moon/moon.mod index 586cdc1081..d1683df018 100644 --- a/data/scene/moon/moon.mod +++ b/data/scene/moon/moon.mod @@ -30,7 +30,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "MOON", Observer = "EARTH BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/newhorizons/jupiter/callisto/callisto.mod b/data/scene/newhorizons/jupiter/callisto/callisto.mod index c00cd996e1..83e4e58c14 100644 --- a/data/scene/newhorizons/jupiter/callisto/callisto.mod +++ b/data/scene/newhorizons/jupiter/callisto/callisto.mod @@ -39,7 +39,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "CALLISTO", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" @@ -70,7 +70,7 @@ return { ]] Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -10000000, 0} }, }, diff --git a/data/scene/newhorizons/jupiter/europa/europa.mod b/data/scene/newhorizons/jupiter/europa/europa.mod index fc7c032a2b..f09899f0f3 100644 --- a/data/scene/newhorizons/jupiter/europa/europa.mod +++ b/data/scene/newhorizons/jupiter/europa/europa.mod @@ -39,7 +39,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "EUROPA", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" @@ -70,7 +70,7 @@ return { ]] Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -10000000, 0} }, }, diff --git a/data/scene/newhorizons/jupiter/ganymede/ganymede.mod b/data/scene/newhorizons/jupiter/ganymede/ganymede.mod index 3f14d6495f..eb6d0aa01b 100644 --- a/data/scene/newhorizons/jupiter/ganymede/ganymede.mod +++ b/data/scene/newhorizons/jupiter/ganymede/ganymede.mod @@ -39,7 +39,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "GANYMEDE", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" @@ -64,7 +64,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -10000000, 0} }, }, diff --git a/data/scene/newhorizons/jupiter/io/io.mod b/data/scene/newhorizons/jupiter/io/io.mod index 7fde7e5650..a5fe7540b3 100644 --- a/data/scene/newhorizons/jupiter/io/io.mod +++ b/data/scene/newhorizons/jupiter/io/io.mod @@ -39,7 +39,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "IO", Observer = "JUPITER BARYCENTER", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" @@ -80,7 +80,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -10000000, 0} }, }, diff --git a/data/scene/newhorizons/jupiter/jupiter/jupiter.mod b/data/scene/newhorizons/jupiter/jupiter/jupiter.mod index ccb6649f29..04d07a3a1e 100644 --- a/data/scene/newhorizons/jupiter/jupiter/jupiter.mod +++ b/data/scene/newhorizons/jupiter/jupiter/jupiter.mod @@ -5,7 +5,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "JUPITER BARYCENTER", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" @@ -108,7 +108,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -100000000, 0} }, }, diff --git a/data/scene/newhorizons/newhorizons/newhorizons.mod b/data/scene/newhorizons/newhorizons/newhorizons.mod index a4ba9124f4..af08d5f56b 100644 --- a/data/scene/newhorizons/newhorizons/newhorizons.mod +++ b/data/scene/newhorizons/newhorizons/newhorizons.mod @@ -104,7 +104,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "NEW HORIZONS", Observer = "SUN", Kernels = NewHorizonsKernels diff --git a/data/scene/newhorizons/pluto/charon/charon.mod b/data/scene/newhorizons/pluto/charon/charon.mod index f7a2f5e35a..d800cce9c9 100644 --- a/data/scene/newhorizons/pluto/charon/charon.mod +++ b/data/scene/newhorizons/pluto/charon/charon.mod @@ -58,7 +58,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "CHARON", Observer = "PLUTO BARYCENTER", Kernels = NewHorizonsKernels @@ -83,7 +83,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -1000000, 0} }, }, diff --git a/data/scene/newhorizons/pluto/hydra/hydra.mod b/data/scene/newhorizons/pluto/hydra/hydra.mod index 89246a82f6..fe07fe078c 100644 --- a/data/scene/newhorizons/pluto/hydra/hydra.mod +++ b/data/scene/newhorizons/pluto/hydra/hydra.mod @@ -29,7 +29,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "HYDRA", Observer = "PLUTO BARYCENTER", Kernels = NewHorizonsKernels @@ -53,7 +53,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {1000000, 0, 1000000}, }, }, diff --git a/data/scene/newhorizons/pluto/kerberos/kerberos.mod b/data/scene/newhorizons/pluto/kerberos/kerberos.mod index ba541c4de2..8690a6317a 100644 --- a/data/scene/newhorizons/pluto/kerberos/kerberos.mod +++ b/data/scene/newhorizons/pluto/kerberos/kerberos.mod @@ -29,7 +29,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "KERBEROS", Observer = "PLUTO BARYCENTER", Kernels = NewHorizonsKernels @@ -53,7 +53,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {1000000, 0, 1000000}, }, }, diff --git a/data/scene/newhorizons/pluto/nix/nix.mod b/data/scene/newhorizons/pluto/nix/nix.mod index 10145a29ae..84d923c36d 100644 --- a/data/scene/newhorizons/pluto/nix/nix.mod +++ b/data/scene/newhorizons/pluto/nix/nix.mod @@ -29,7 +29,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "NIX", Observer = "PLUTO BARYCENTER", Kernels = NewHorizonsKernels diff --git a/data/scene/newhorizons/pluto/pluto/pluto.mod b/data/scene/newhorizons/pluto/pluto/pluto.mod index c6bae149dd..e6c4537046 100644 --- a/data/scene/newhorizons/pluto/pluto/pluto.mod +++ b/data/scene/newhorizons/pluto/pluto/pluto.mod @@ -23,7 +23,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "PLUTO BARYCENTER", Observer = "SUN", Kernels = NewHorizonsKernels @@ -157,7 +157,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "PLUTO", Observer = "PLUTO BARYCENTER", Kernels = NewHorizonsKernels @@ -197,7 +197,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -2000000, 0} }, }, @@ -215,7 +215,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, -4000000, 0} }, }, diff --git a/data/scene/newhorizons/pluto/styx/styx.mod b/data/scene/newhorizons/pluto/styx/styx.mod index 52918a7d26..2c2cf774b1 100644 --- a/data/scene/newhorizons/pluto/styx/styx.mod +++ b/data/scene/newhorizons/pluto/styx/styx.mod @@ -29,7 +29,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "STYX", Observer = "PLUTO BARYCENTER", Kernels = NewHorizonsKernels @@ -54,7 +54,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {1000000, 0, 1000000} }, }, diff --git a/data/scene/osirisrex/bennu/bennu.mod b/data/scene/osirisrex/bennu/bennu.mod index 6ab9afaa94..eeabed0e09 100644 --- a/data/scene/osirisrex/bennu/bennu.mod +++ b/data/scene/osirisrex/bennu/bennu.mod @@ -9,7 +9,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = BENNU_BODY, Observer = "SUN", }, diff --git a/data/scene/osirisrex/osirisrex/osirisrex.mod b/data/scene/osirisrex/osirisrex/osirisrex.mod index d0c8918d2f..51272879be 100644 --- a/data/scene/osirisrex/osirisrex/osirisrex.mod +++ b/data/scene/osirisrex/osirisrex/osirisrex.mod @@ -27,7 +27,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "OSIRIS-REX", Observer = "SUN", }, @@ -61,7 +61,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {-0.2476, 0.2710, 0.3364}, }, Rotation = { @@ -94,7 +94,7 @@ return { }, Transform = { Translation = { - Type = "StaticEphemeris", + Type = "StaticTranslation", Position = {0, 0.3371, 0.2712}, }, Rotation = { diff --git a/data/scene/rosetta/67P/67P.mod b/data/scene/rosetta/67P/67P.mod index 84af8afce9..1b8d3a5aa7 100644 --- a/data/scene/rosetta/67P/67P.mod +++ b/data/scene/rosetta/67P/67P.mod @@ -5,7 +5,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "CHURYUMOV-GERASIMENKO", Observer = "SUN", }, diff --git a/data/scene/rosetta/rosetta/rosetta.mod b/data/scene/rosetta/rosetta/rosetta.mod index 73b8181ecc..1bb96fe198 100644 --- a/data/scene/rosetta/rosetta/rosetta.mod +++ b/data/scene/rosetta/rosetta/rosetta.mod @@ -62,7 +62,7 @@ return { Parent = "SolarSystemBarycenter", Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "ROSETTA", Observer = "SUN", Kernels = RosettaKernels @@ -273,7 +273,7 @@ return { -- translated Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "PHILAE", Observer = "CHURYUMOV-GERASIMENKO", Kernels = RosettaKernels diff --git a/data/scene/saturn/saturn.mod b/data/scene/saturn/saturn.mod index 1f7e68170d..ac59c3d9c9 100644 --- a/data/scene/saturn/saturn.mod +++ b/data/scene/saturn/saturn.mod @@ -30,7 +30,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "SATURN BARYCENTER", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/data/scene/uranus/uranus.mod b/data/scene/uranus/uranus.mod index 77bac51663..1653178896 100644 --- a/data/scene/uranus/uranus.mod +++ b/data/scene/uranus/uranus.mod @@ -30,7 +30,7 @@ return { }, Transform = { Translation = { - Type = "SpiceEphemeris", + Type = "SpiceTranslation", Body = "URANUS BARYCENTER", Observer = "SUN", Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" diff --git a/include/openspace/scene/ephemeris.h b/include/openspace/scene/ephemeris.h index ae56fe8569..2b900c82f0 100644 --- a/include/openspace/scene/ephemeris.h +++ b/include/openspace/scene/ephemeris.h @@ -34,11 +34,11 @@ namespace openspace { -class Ephemeris : public properties::PropertyOwner { +class Translation : public properties::PropertyOwner { public: - static Ephemeris* createFromDictionary(const ghoul::Dictionary& dictionary); + static Translation* createFromDictionary(const ghoul::Dictionary& dictionary); - virtual ~Ephemeris(); + virtual ~Translation(); virtual bool initialize(); virtual glm::dvec3 position() const = 0; virtual void update(const UpdateData& data); diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index a7a3c4cac7..f8ae45310f 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -103,9 +103,9 @@ public: // @TODO Remove once the scalegraph is in effect ---abock - void setEphemeris(Ephemeris* eph) { - delete _ephemeris; - _ephemeris = eph; + void setEphemeris(Translation* eph) { + delete _translation; + _translation = eph; } static documentation::Documentation Documentation(); @@ -129,7 +129,7 @@ private: PowerScaledScalar _boundingSphere; // Transformation defined by ephemeris, rotation and scale - Ephemeris* _ephemeris; + Translation* _translation; Rotation* _rotation; Scale* _scale; diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp index e1725442fe..e27873ed41 100644 --- a/modules/base/basemodule.cpp +++ b/modules/base/basemodule.cpp @@ -108,11 +108,11 @@ void BaseModule::internalInitialize() { fRenderable->registerClass("RenderableTrail"); fRenderable->registerClass("RenderableTrailNew"); - auto fEphemeris = FactoryManager::ref().factory(); - ghoul_assert(fEphemeris, "Ephemeris factory was not created"); + auto fTranslation = FactoryManager::ref().factory(); + ghoul_assert(fTranslation, "Ephemeris factory was not created"); - fEphemeris->registerClass("StaticEphemeris"); - fEphemeris->registerClass("SpiceEphemeris"); + fTranslation->registerClass("StaticTranslation"); + fTranslation->registerClass("SpiceTranslation"); auto fRotation = FactoryManager::ref().factory(); ghoul_assert(fRotation, "Rotation factory was not created"); @@ -137,8 +137,8 @@ void BaseModule::internalInitialize() { std::vector BaseModule::documentations() const { return { StaticScale::Documentation(), - StaticEphemeris::Documentation(), - SpiceEphemeris::Documentation() + StaticTranslation::Documentation(), + SpiceTranslation::Documentation() }; } diff --git a/modules/base/ephemeris/spiceephemeris.cpp b/modules/base/ephemeris/spiceephemeris.cpp index 59d6e6a1b4..3b0d41eae8 100644 --- a/modules/base/ephemeris/spiceephemeris.cpp +++ b/modules/base/ephemeris/spiceephemeris.cpp @@ -41,7 +41,7 @@ namespace { namespace openspace { -Documentation SpiceEphemeris::Documentation() { +Documentation SpiceTranslation::Documentation() { using namespace openspace::documentation; return { @@ -50,7 +50,7 @@ Documentation SpiceEphemeris::Documentation() { { { "Type", - new StringEqualVerifier("SpiceEphemeris"), + new StringEqualVerifier("SpiceTranslation"), "", Optional::No }, @@ -89,7 +89,7 @@ Documentation SpiceEphemeris::Documentation() { }; } -SpiceEphemeris::SpiceEphemeris(const ghoul::Dictionary& dictionary) +SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) : _target("target", "Target", "") , _origin("origin", "Origin", "") , _kernelsLoadedSuccessfully(true) @@ -97,7 +97,7 @@ SpiceEphemeris::SpiceEphemeris(const ghoul::Dictionary& dictionary) documentation::testSpecificationAndThrow( Documentation(), dictionary, - "SpiceEphemeris" + "SpiceTranslation" ); _target = dictionary.value(KeyBody); @@ -132,11 +132,11 @@ SpiceEphemeris::SpiceEphemeris(const ghoul::Dictionary& dictionary) } } -glm::dvec3 SpiceEphemeris::position() const { +glm::dvec3 SpiceTranslation::position() const { return _position; } -void SpiceEphemeris::update(const UpdateData& data) { +void SpiceTranslation::update(const UpdateData& data) { double lightTime = 0.0; _position = SpiceManager::ref().targetPosition( _target, _origin, ReferenceFrame, {}, data.time, lightTime diff --git a/modules/base/ephemeris/spiceephemeris.h b/modules/base/ephemeris/spiceephemeris.h index 92d9991e1e..122f03cc08 100644 --- a/modules/base/ephemeris/spiceephemeris.h +++ b/modules/base/ephemeris/spiceephemeris.h @@ -32,9 +32,9 @@ namespace openspace { -class SpiceEphemeris : public Ephemeris { +class SpiceTranslation : public Translation { public: - SpiceEphemeris(const ghoul::Dictionary& dictionary); + SpiceTranslation(const ghoul::Dictionary& dictionary); glm::dvec3 position() const; void update(const UpdateData& data) override; diff --git a/modules/base/ephemeris/staticephemeris.cpp b/modules/base/ephemeris/staticephemeris.cpp index 551da7a05c..ef7ef2b0f4 100644 --- a/modules/base/ephemeris/staticephemeris.cpp +++ b/modules/base/ephemeris/staticephemeris.cpp @@ -32,7 +32,7 @@ namespace { namespace openspace { -Documentation StaticEphemeris::Documentation() { +Documentation StaticTranslation::Documentation() { using namespace openspace::documentation; return { "Static Translation", @@ -40,7 +40,7 @@ Documentation StaticEphemeris::Documentation() { { { "Type", - new StringEqualVerifier("StaticEphemeris"), + new StringEqualVerifier("StaticTranslation"), "", Optional::No }, @@ -57,7 +57,7 @@ Documentation StaticEphemeris::Documentation() { } -StaticEphemeris::StaticEphemeris() +StaticTranslation::StaticTranslation() : _position( "position", "Position", @@ -69,8 +69,8 @@ StaticEphemeris::StaticEphemeris() addProperty(_position); } -StaticEphemeris::StaticEphemeris(const ghoul::Dictionary& dictionary) - : StaticEphemeris() +StaticTranslation::StaticTranslation(const ghoul::Dictionary& dictionary) + : StaticTranslation() { documentation::testSpecificationAndThrow( Documentation(), @@ -81,12 +81,12 @@ StaticEphemeris::StaticEphemeris(const ghoul::Dictionary& dictionary) _position = dictionary.value(KeyPosition); } -StaticEphemeris::~StaticEphemeris() {} +StaticTranslation::~StaticTranslation() {} -glm::dvec3 StaticEphemeris::position() const { +glm::dvec3 StaticTranslation::position() const { return _position; } -void StaticEphemeris::update(const UpdateData&) {} +void StaticTranslation::update(const UpdateData&) {} } // namespace openspace diff --git a/modules/base/ephemeris/staticephemeris.h b/modules/base/ephemeris/staticephemeris.h index d85f3eba41..3956c046ff 100644 --- a/modules/base/ephemeris/staticephemeris.h +++ b/modules/base/ephemeris/staticephemeris.h @@ -32,11 +32,11 @@ namespace openspace { -class StaticEphemeris : public Ephemeris { +class StaticTranslation : public Translation { public: - StaticEphemeris(); - StaticEphemeris(const ghoul::Dictionary& dictionary); - virtual ~StaticEphemeris(); + StaticTranslation(); + StaticTranslation(const ghoul::Dictionary& dictionary); + virtual ~StaticTranslation(); virtual glm::dvec3 position() const; virtual void update(const UpdateData& data) override; diff --git a/src/documentation/core_registration.cpp b/src/documentation/core_registration.cpp index 8f89f4621e..4fb8356db5 100644 --- a/src/documentation/core_registration.cpp +++ b/src/documentation/core_registration.cpp @@ -42,7 +42,7 @@ namespace documentation { void registerCoreClasses(documentation::DocumentationEngine& engine) { engine.addDocumentation(ConfigurationManager::Documentation()); - engine.addDocumentation(Ephemeris::Documentation()); + engine.addDocumentation(Translation::Documentation()); engine.addDocumentation(Mission::Documentation()); engine.addDocumentation(Renderable::Documentation()); engine.addDocumentation(Rotation::Documentation()); diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 36455ffcf8..efdce43beb 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -163,8 +163,8 @@ OpenSpaceEngine::OpenSpaceEngine(std::string programName, "Renderable" ); FactoryManager::ref().addFactory( - std::make_unique>(), - "Ephemeris" + std::make_unique>(), + "Translation" ); SpiceManager::initialize(); Time::initialize(); diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 54f7b92a33..817b65378a 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -814,391 +814,391 @@ performance::PerformanceManager* RenderEngine::performanceManager() { // This method is temporary and will be removed once the scalegraph is in effect ---abock void RenderEngine::changeViewPoint(std::string origin) { - SceneGraphNode* solarSystemBarycenterNode = scene()->sceneGraphNode("SolarSystemBarycenter"); - SceneGraphNode* plutoBarycenterNode = scene()->sceneGraphNode("PlutoBarycenter"); - SceneGraphNode* newHorizonsNode = scene()->sceneGraphNode("NewHorizons"); - SceneGraphNode* newHorizonsPathNodeJ = scene()->sceneGraphNode("NewHorizonsPathJupiter"); - SceneGraphNode* newHorizonsPathNodeP = scene()->sceneGraphNode("NewHorizonsPathPluto"); -// SceneGraphNode* cg67pNode = scene()->sceneGraphNode("67P"); -// SceneGraphNode* rosettaNode = scene()->sceneGraphNode("Rosetta"); - - RenderablePath* nhPath; - - SceneGraphNode* jupiterBarycenterNode = scene()->sceneGraphNode("JupiterBarycenter"); - - //SceneGraphNode* newHorizonsGhostNode = scene()->sceneGraphNode("NewHorizonsGhost"); - //SceneGraphNode* dawnNode = scene()->sceneGraphNode("Dawn"); - //SceneGraphNode* vestaNode = scene()->sceneGraphNode("Vesta"); - - // if (solarSystemBarycenterNode == nullptr || plutoBarycenterNode == nullptr || - //jupiterBarycenterNode == nullptr) { - // LERROR("Necessary nodes does not exist"); - //return; - // } - - if (origin == "Pluto") { - if (newHorizonsPathNodeP) { - Renderable* R = newHorizonsPathNodeP->renderable(); - newHorizonsPathNodeP->setParent(plutoBarycenterNode); - nhPath = static_cast(R); - nhPath->calculatePath("PLUTO BARYCENTER"); - } - - plutoBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem")); - plutoBarycenterNode->setEphemeris(new StaticEphemeris); - - solarSystemBarycenterNode->setParent(plutoBarycenterNode); - newHorizonsNode->setParent(plutoBarycenterNode); - //newHorizonsGhostNode->setParent(plutoBarycenterNode); - - //dawnNode->setParent(plutoBarycenterNode); - //vestaNode->setParent(plutoBarycenterNode); - - //newHorizonsTrailNode->setParent(plutoBarycenterNode); - 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("PLUTO BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - - ghoul::Dictionary jupiterDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("JUPITER BARYCENTER") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("PLUTO BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - - ghoul::Dictionary newHorizonsDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("NEW HORIZONS") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("PLUTO BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - - solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); - jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary)); - newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - - - //ghoul::Dictionary dawnDictionary = - //{ - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("DAWN") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("PLUTO BARYCENTER") }, - // { std::string("Kernels"), ghoul::Dictionary() } - //}; - //dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); - // - //ghoul::Dictionary vestaDictionary = - //{ - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("VESTA") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("PLUTO BARYCENTER") }, - // { std::string("Kernels"), ghoul::Dictionary() } - //}; - //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)); - - return; - } - if (origin == "Sun") { - solarSystemBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem")); - - if (plutoBarycenterNode) - plutoBarycenterNode->setParent(solarSystemBarycenterNode); - jupiterBarycenterNode->setParent(solarSystemBarycenterNode); - if (newHorizonsNode) - newHorizonsNode->setParent(solarSystemBarycenterNode); - //newHorizonsGhostNode->setParent(solarSystemBarycenterNode); - - //newHorizonsTrailNode->setParent(solarSystemBarycenterNode); - //dawnNode->setParent(solarSystemBarycenterNode); - //vestaNode->setParent(solarSystemBarycenterNode); - - ghoul::Dictionary plutoDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("PLUTO BARYCENTER") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("SUN") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - ghoul::Dictionary jupiterDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("JUPITER BARYCENTER") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("SUN") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - - solarSystemBarycenterNode->setEphemeris(new StaticEphemeris); - jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary)); - if (plutoBarycenterNode) - plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); - - ghoul::Dictionary newHorizonsDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("NEW HORIZONS") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("SUN") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - if (newHorizonsNode) - newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - - - //ghoul::Dictionary dawnDictionary = - //{ - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("DAWN") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("SUN") }, - // { std::string("Kernels"), ghoul::Dictionary() } - //}; - //dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); - // - //ghoul::Dictionary vestaDictionary = - //{ - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("VESTA") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("SUN") }, - // { std::string("Kernels"), ghoul::Dictionary() } - //}; - //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)); - - return; - } - if (origin == "Jupiter") { - if (newHorizonsPathNodeJ) { - Renderable* R = newHorizonsPathNodeJ->renderable(); - newHorizonsPathNodeJ->setParent(jupiterBarycenterNode); - nhPath = static_cast(R); - nhPath->calculatePath("JUPITER BARYCENTER"); - } - - jupiterBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem")); - jupiterBarycenterNode->setEphemeris(new StaticEphemeris); - - solarSystemBarycenterNode->setParent(jupiterBarycenterNode); - if (newHorizonsNode) - newHorizonsNode->setParent(jupiterBarycenterNode); - //newHorizonsTrailNode->setParent(jupiterBarycenterNode); - - //dawnNode->setParent(jupiterBarycenterNode); - //vestaNode->setParent(jupiterBarycenterNode); - - - 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("JUPITER BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - - ghoul::Dictionary plutoDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("PlUTO BARYCENTER") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("JUPITER BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - - ghoul::Dictionary newHorizonsDictionary = - { - { std::string("Type"), std::string("Spice") }, - { std::string("Body"), std::string("NEW HORIZONS") }, - { std::string("Reference"), std::string("GALACTIC") }, - { std::string("Observer"), std::string("JUPITER BARYCENTER") }, - { std::string("Kernels"), ghoul::Dictionary() } - }; - solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); - if (plutoBarycenterNode) - plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); - if (newHorizonsNode) - newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - //newHorizonsGhostNode->setParent(jupiterBarycenterNode); - //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - - - //ghoul::Dictionary dawnDictionary = - //{ - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("DAWN") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("JUPITER BARYCENTER") }, - // { std::string("Kernels"), ghoul::Dictionary() } - //}; - //dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); - // - //ghoul::Dictionary vestaDictionary = - //{ - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("VESTA") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("JUPITER BARYCENTER") }, - // { std::string("Kernels"), ghoul::Dictionary() } - //}; - //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)); - //newHorizonsGhostNode->setParent(jupiterBarycenterNode); - - - return; - } - //if (origin == "Vesta") { - // - // vestaNode->setParent(scene()->sceneGraphNode("SolarSystem")); - // vestaNode->setEphemeris(new StaticEphemeris); - // - // solarSystemBarycenterNode->setParent(vestaNode); - // newHorizonsNode->setParent(vestaNode); - // - // dawnNode->setParent(vestaNode); - // plutoBarycenterNode->setParent(vestaNode); - // - // - // ghoul::Dictionary plutoDictionary = - // { - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("PLUTO BARYCENTER") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("VESTA") }, - // { std::string("Kernels"), ghoul::Dictionary() } - // }; - // 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("VESTA") }, - // { std::string("Kernels"), ghoul::Dictionary() } - // }; - // - // ghoul::Dictionary jupiterDictionary = - // { - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("JUPITER BARYCENTER") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("VESTA") }, - // { std::string("Kernels"), ghoul::Dictionary() } - // }; - // - // solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); - // plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); - // jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary)); - // - // ghoul::Dictionary newHorizonsDictionary = - // { - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("NEW HORIZONS") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("VESTA") }, - // { std::string("Kernels"), ghoul::Dictionary() } - // }; - // newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); - // - // ghoul::Dictionary dawnDictionary = - // { - // { std::string("Type"), std::string("Spice") }, - // { std::string("Body"), std::string("DAWN") }, - // { std::string("Reference"), std::string("GALACTIC") }, - // { std::string("Observer"), std::string("VESTA") }, - // { std::string("Kernels"), ghoul::Dictionary() } - // }; - // dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); - // vestaNode->setEphemeris(new StaticEphemeris); - // - // 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; - - } - - LFATAL("This function is being misused with an argument of '" << origin << "'"); +// SceneGraphNode* solarSystemBarycenterNode = scene()->sceneGraphNode("SolarSystemBarycenter"); +// SceneGraphNode* plutoBarycenterNode = scene()->sceneGraphNode("PlutoBarycenter"); +// SceneGraphNode* newHorizonsNode = scene()->sceneGraphNode("NewHorizons"); +// SceneGraphNode* newHorizonsPathNodeJ = scene()->sceneGraphNode("NewHorizonsPathJupiter"); +// SceneGraphNode* newHorizonsPathNodeP = scene()->sceneGraphNode("NewHorizonsPathPluto"); +//// SceneGraphNode* cg67pNode = scene()->sceneGraphNode("67P"); +//// SceneGraphNode* rosettaNode = scene()->sceneGraphNode("Rosetta"); +// +// RenderablePath* nhPath; +// +// SceneGraphNode* jupiterBarycenterNode = scene()->sceneGraphNode("JupiterBarycenter"); +// +// //SceneGraphNode* newHorizonsGhostNode = scene()->sceneGraphNode("NewHorizonsGhost"); +// //SceneGraphNode* dawnNode = scene()->sceneGraphNode("Dawn"); +// //SceneGraphNode* vestaNode = scene()->sceneGraphNode("Vesta"); +// +// // if (solarSystemBarycenterNode == nullptr || plutoBarycenterNode == nullptr || +// //jupiterBarycenterNode == nullptr) { +// // LERROR("Necessary nodes does not exist"); +// //return; +// // } +// +// if (origin == "Pluto") { +// if (newHorizonsPathNodeP) { +// Renderable* R = newHorizonsPathNodeP->renderable(); +// newHorizonsPathNodeP->setParent(plutoBarycenterNode); +// nhPath = static_cast(R); +// nhPath->calculatePath("PLUTO BARYCENTER"); +// } +// +// plutoBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem")); +// plutoBarycenterNode->setEphemeris(new StaticEphemeris); +// +// solarSystemBarycenterNode->setParent(plutoBarycenterNode); +// newHorizonsNode->setParent(plutoBarycenterNode); +// //newHorizonsGhostNode->setParent(plutoBarycenterNode); +// +// //dawnNode->setParent(plutoBarycenterNode); +// //vestaNode->setParent(plutoBarycenterNode); +// +// //newHorizonsTrailNode->setParent(plutoBarycenterNode); +// 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("PLUTO BARYCENTER") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// +// ghoul::Dictionary jupiterDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("JUPITER BARYCENTER") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("PLUTO BARYCENTER") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// +// ghoul::Dictionary newHorizonsDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("NEW HORIZONS") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("PLUTO BARYCENTER") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// +// solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); +// jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary)); +// newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// +// +// //ghoul::Dictionary dawnDictionary = +// //{ +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("DAWN") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("PLUTO BARYCENTER") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// //}; +// //dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); +// // +// //ghoul::Dictionary vestaDictionary = +// //{ +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("VESTA") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("PLUTO BARYCENTER") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// //}; +// //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)); +// +// return; +// } +// if (origin == "Sun") { +// solarSystemBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem")); +// +// if (plutoBarycenterNode) +// plutoBarycenterNode->setParent(solarSystemBarycenterNode); +// jupiterBarycenterNode->setParent(solarSystemBarycenterNode); +// if (newHorizonsNode) +// newHorizonsNode->setParent(solarSystemBarycenterNode); +// //newHorizonsGhostNode->setParent(solarSystemBarycenterNode); +// +// //newHorizonsTrailNode->setParent(solarSystemBarycenterNode); +// //dawnNode->setParent(solarSystemBarycenterNode); +// //vestaNode->setParent(solarSystemBarycenterNode); +// +// ghoul::Dictionary plutoDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("PLUTO BARYCENTER") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("SUN") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// ghoul::Dictionary jupiterDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("JUPITER BARYCENTER") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("SUN") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// +// solarSystemBarycenterNode->setEphemeris(new StaticEphemeris); +// jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary)); +// if (plutoBarycenterNode) +// plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); +// +// ghoul::Dictionary newHorizonsDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("NEW HORIZONS") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("SUN") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// if (newHorizonsNode) +// newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// +// +// //ghoul::Dictionary dawnDictionary = +// //{ +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("DAWN") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("SUN") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// //}; +// //dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); +// // +// //ghoul::Dictionary vestaDictionary = +// //{ +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("VESTA") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("SUN") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// //}; +// //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)); +// +// return; +// } +// if (origin == "Jupiter") { +// if (newHorizonsPathNodeJ) { +// Renderable* R = newHorizonsPathNodeJ->renderable(); +// newHorizonsPathNodeJ->setParent(jupiterBarycenterNode); +// nhPath = static_cast(R); +// nhPath->calculatePath("JUPITER BARYCENTER"); +// } +// +// jupiterBarycenterNode->setParent(scene()->sceneGraphNode("SolarSystem")); +// jupiterBarycenterNode->setEphemeris(new StaticEphemeris); +// +// solarSystemBarycenterNode->setParent(jupiterBarycenterNode); +// if (newHorizonsNode) +// newHorizonsNode->setParent(jupiterBarycenterNode); +// //newHorizonsTrailNode->setParent(jupiterBarycenterNode); +// +// //dawnNode->setParent(jupiterBarycenterNode); +// //vestaNode->setParent(jupiterBarycenterNode); +// +// +// 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("JUPITER BARYCENTER") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// +// ghoul::Dictionary plutoDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("PlUTO BARYCENTER") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("JUPITER BARYCENTER") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// +// ghoul::Dictionary newHorizonsDictionary = +// { +// { std::string("Type"), std::string("Spice") }, +// { std::string("Body"), std::string("NEW HORIZONS") }, +// { std::string("Reference"), std::string("GALACTIC") }, +// { std::string("Observer"), std::string("JUPITER BARYCENTER") }, +// { std::string("Kernels"), ghoul::Dictionary() } +// }; +// solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); +// if (plutoBarycenterNode) +// plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); +// if (newHorizonsNode) +// newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// //newHorizonsGhostNode->setParent(jupiterBarycenterNode); +// //newHorizonsTrailNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// +// +// //ghoul::Dictionary dawnDictionary = +// //{ +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("DAWN") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("JUPITER BARYCENTER") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// //}; +// //dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); +// // +// //ghoul::Dictionary vestaDictionary = +// //{ +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("VESTA") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("JUPITER BARYCENTER") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// //}; +// //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)); +// //newHorizonsGhostNode->setParent(jupiterBarycenterNode); +// +// +// return; +// } +// //if (origin == "Vesta") { +// // +// // vestaNode->setParent(scene()->sceneGraphNode("SolarSystem")); +// // vestaNode->setEphemeris(new StaticEphemeris); +// // +// // solarSystemBarycenterNode->setParent(vestaNode); +// // newHorizonsNode->setParent(vestaNode); +// // +// // dawnNode->setParent(vestaNode); +// // plutoBarycenterNode->setParent(vestaNode); +// // +// // +// // ghoul::Dictionary plutoDictionary = +// // { +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("PLUTO BARYCENTER") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("VESTA") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// // }; +// // 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("VESTA") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// // }; +// // +// // ghoul::Dictionary jupiterDictionary = +// // { +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("JUPITER BARYCENTER") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("VESTA") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// // }; +// // +// // solarSystemBarycenterNode->setEphemeris(new SpiceEphemeris(solarDictionary)); +// // plutoBarycenterNode->setEphemeris(new SpiceEphemeris(plutoDictionary)); +// // jupiterBarycenterNode->setEphemeris(new SpiceEphemeris(jupiterDictionary)); +// // +// // ghoul::Dictionary newHorizonsDictionary = +// // { +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("NEW HORIZONS") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("VESTA") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// // }; +// // newHorizonsNode->setEphemeris(new SpiceEphemeris(newHorizonsDictionary)); +// // +// // ghoul::Dictionary dawnDictionary = +// // { +// // { std::string("Type"), std::string("Spice") }, +// // { std::string("Body"), std::string("DAWN") }, +// // { std::string("Reference"), std::string("GALACTIC") }, +// // { std::string("Observer"), std::string("VESTA") }, +// // { std::string("Kernels"), ghoul::Dictionary() } +// // }; +// // dawnNode->setEphemeris(new SpiceEphemeris(dawnDictionary)); +// // vestaNode->setEphemeris(new StaticEphemeris); +// // +// // 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; +// +// } +// +// LFATAL("This function is being misused with an argument of '" << origin << "'"); } void RenderEngine::setShowFrameNumber(bool enabled){ diff --git a/src/scene/ephemeris.cpp b/src/scene/ephemeris.cpp index 9051d5a977..e6fe5d00cc 100644 --- a/src/scene/ephemeris.cpp +++ b/src/scene/ephemeris.cpp @@ -29,13 +29,13 @@ #include namespace { - const std::string _loggerCat = "Ephemeris"; + const std::string _loggerCat = "Translation"; const std::string KeyType = "Type"; } namespace openspace { -Documentation Ephemeris::Documentation() { +Documentation Translation::Documentation() { using namespace openspace::documentation; return{ @@ -56,31 +56,31 @@ Documentation Ephemeris::Documentation() { }; } -Ephemeris* Ephemeris::createFromDictionary(const ghoul::Dictionary& dictionary) { +Translation* Translation::createFromDictionary(const ghoul::Dictionary& dictionary) { if (!dictionary.hasValue(KeyType)) { - LERROR("Ephemeris did not have key '" << KeyType << "'"); + LERROR("Translation did not have key '" << KeyType << "'"); return nullptr; } - std::string ephemerisType; - dictionary.getValue(KeyType, ephemerisType); - ghoul::TemplateFactory* factory - = FactoryManager::ref().factory(); - Ephemeris* result = factory->create(ephemerisType, dictionary); + std::string translationType; + dictionary.getValue(KeyType, translationType); + ghoul::TemplateFactory* factory + = FactoryManager::ref().factory(); + Translation* result = factory->create(translationType, dictionary); if (result == nullptr) { - LERROR("Failed creating Ephemeris object of type '" << ephemerisType << "'"); + LERROR("Failed creating Translation object of type '" << translationType << "'"); return nullptr; } return result; } -Ephemeris::~Ephemeris() {} +Translation::~Translation() {} -bool Ephemeris::initialize() { +bool Translation::initialize() { return true; } -void Ephemeris::update(const UpdateData& data) {} +void Translation::update(const UpdateData& data) {} } // namespace openspace diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index e3334e178d..24702a6828 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -106,9 +106,9 @@ SceneGraphNode* SceneGraphNode::createFromDictionary(const ghoul::Dictionary& di if (dictionary.hasKey(keyTransformTranslation)) { ghoul::Dictionary translationDictionary; dictionary.getValue(keyTransformTranslation, translationDictionary); - result->_ephemeris = - (Ephemeris::createFromDictionary(translationDictionary)); - if (result->_ephemeris == nullptr) { + result->_translation = + (Translation::createFromDictionary(translationDictionary)); + if (result->_translation == nullptr) { LERROR("Failed to create ephemeris for SceneGraphNode '" << result->name() << "'"); delete result; @@ -167,7 +167,7 @@ SceneGraphNode* SceneGraphNode::createFromDictionary(const ghoul::Dictionary& di SceneGraphNode::SceneGraphNode() : _parent(nullptr) - , _ephemeris(new StaticEphemeris()) + , _translation(new StaticTranslation()) , _rotation(new StaticRotation()) , _scale(new StaticScale()) , _performanceRecord({0, 0, 0}) @@ -185,8 +185,8 @@ bool SceneGraphNode::initialize() { if (_renderable) _renderable->initialize(); - if (_ephemeris) - _ephemeris->initialize(); + if (_translation) + _translation->initialize(); if (_rotation) _rotation->initialize(); if (_scale) @@ -203,9 +203,9 @@ bool SceneGraphNode::deinitialize() { delete _renderable; _renderable = nullptr; } - if (_ephemeris) { - delete _ephemeris; - _ephemeris = nullptr; + if (_translation) { + delete _translation; + _translation = nullptr; } if (_rotation) { delete _rotation; @@ -235,19 +235,19 @@ bool SceneGraphNode::deinitialize() { } void SceneGraphNode::update(const UpdateData& data) { - if (_ephemeris) { + if (_translation) { if (data.doPerformanceMeasurement) { glFinish(); auto start = std::chrono::high_resolution_clock::now(); - _ephemeris->update(data); + _translation->update(data); glFinish(); auto end = std::chrono::high_resolution_clock::now(); _performanceRecord.updateTimeEphemeris = (end - start).count(); } else - _ephemeris->update(data); + _translation->update(data); } if (_rotation) { @@ -431,7 +431,7 @@ void SceneGraphNode::addChild(SceneGraphNode* child) { glm::dvec3 SceneGraphNode::position() const { - return _ephemeris->position(); + return _translation->position(); } const glm::dmat3& SceneGraphNode::rotationMatrix() const