diff --git a/data/scene/callisto/callisto.mod b/data/scene/callisto/callisto.mod index 97dfb0362e..3d95a18559 100644 --- a/data/scene/callisto/callisto.mod +++ b/data/scene/callisto/callisto.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_CALLISTO", -- should exist. - Body = "CALLISTO", + Frame = "IAU_CALLISTO", -- should exist. + Body = "CALLISTO", Geometry = { Type = "SimpleSphere", Radius = { 2.631, 6}, diff --git a/data/scene/ceres/ceres.mod b/data/scene/ceres/ceres.mod index c09f0d5cce..2c2406d4a6 100644 --- a/data/scene/ceres/ceres.mod +++ b/data/scene/ceres/ceres.mod @@ -4,10 +4,10 @@ return { Name = "Ceres", Parent = "SolarSystemBarycenter", - Renderable = { + Renderable = { Type = "RenderablePlanet", - Frame = "IAU_CERES", - Body = "CERES", + Frame = "IAU_CERES", + Body = "CERES", Geometry = { Type = "SimpleSphere", Radius = { 6.390, 5 }, @@ -17,18 +17,18 @@ return { Type = "simple", Color = "textures/gray.png", }, - StartTime = "2010 JAN 01 00:00:00", - EndTime = "2018 JAN 22 12:00:00" + StartTime = "2010 JAN 01 00:00:00", + EndTime = "2018 JAN 22 12:00:00" }, - Ephemeris = { + Ephemeris = { Type = "Spice", Body = "CERES", Reference = "GALACTIC", Observer = "SUN", Kernels = { "${OPENSPACE_DATA}/spice/DawnKernels/pck/dawn_ceres_v01.tpc", - "${OPENSPACE_DATA}/spice/DawnKernels/spk/sb_ceres_140724.bsp", - "${OPENSPACE_DATA}/spice/DawnKernels/spk/sb_ceres_110211.bsp", + "${OPENSPACE_DATA}/spice/DawnKernels/spk/sb_ceres_140724.bsp", + "${OPENSPACE_DATA}/spice/DawnKernels/spk/sb_ceres_110211.bsp", } }, Rotation = { @@ -36,34 +36,34 @@ return { Frame = "IAU_CERES", Reference = "GALACTIC" }, - + GuiName = "/Solar/Ceres" }, - --[[ Ceres Trail Module + --[[ Ceres Trail Module { Name = "CeresTrail", Parent = "SolarSystemBarycenter", - Renderable = { + Renderable = { Type = "RenderableTrail", Body = "CERES", - Frame = "GALACTIC", - Observer = "SUN", - - -- 3 Dummy values for compilation: - TropicalOrbitPeriod = 500.0, + Frame = "GALACTIC", + Observer = "SUN", + + -- 3 Dummy values for compilation: + TropicalOrbitPeriod = 500.0, EarthOrbitRatio = 0.2, DayLength = 2, - -- End of Dummy values - - RGB = { 0.7, 0.5, 0.5 }, - Textures = { + -- End of Dummy values + + RGB = { 0.7, 0.5, 0.5 }, + Textures = { Type = "simple", - Color = "textures/glare.png" - }, - StartTime = "2010 JAN 01T00:00:00", - EndTime = "2018 JAN 22 12:00:00" - }, + Color = "textures/glare.png" + }, + StartTime = "2010 JAN 01T00:00:00", + EndTime = "2018 JAN 22 12:00:00" + }, GuiName = "/Solar/CeresTrail" } - --]] + --]] } \ No newline at end of file diff --git a/data/scene/charon/charon.mod b/data/scene/charon/charon.mod index 4f8df43763..4f87e20531 100644 --- a/data/scene/charon/charon.mod +++ b/data/scene/charon/charon.mod @@ -5,8 +5,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_CHARON", - Body = "CHARON", + Frame = "IAU_CHARON", + Body = "CHARON", Geometry = { Type = "SimpleSphere", Radius = { 6.035 , 5 }, diff --git a/data/scene/common/common.mod b/data/scene/common/common.mod index 3022f22b87..aa9e0d050c 100644 --- a/data/scene/common/common.mod +++ b/data/scene/common/common.mod @@ -1,11 +1,11 @@ return { - -- Solar System module - { - Name = "SolarSystem", - Parent = "Root", - Ephemeris = { - Type = "Static", - Position = { 0, 0, 0, 0} - } - }, + -- Solar System module + { + Name = "SolarSystem", + Parent = "Root", + Ephemeris = { + Type = "Static", + Position = { 0, 0, 0, 0} + } + }, } \ No newline at end of file diff --git a/data/scene/earth/earth.mod b/data/scene/earth/earth.mod index 987ed1f0be..a853ebe9c9 100644 --- a/data/scene/earth/earth.mod +++ b/data/scene/earth/earth.mod @@ -27,7 +27,7 @@ return { Renderable = { Type = "RenderablePlanet", Frame = "IAU_EARTH", - Body = "EARTH", + Body = "EARTH", Geometry = { Type = "SimpleSphere", Radius = { 6.371, 6 }, @@ -36,7 +36,7 @@ return { Textures = { Type = "simple", Color = "textures/earth_bluemarble.jpg", - Night = "textures/earth_night.jpg", + Night = "textures/earth_night.jpg", -- Depth = "textures/earth_depth.png" }, Atmosphere = { @@ -82,7 +82,7 @@ return { Billboard = true, Texture = "textures/marker.png" }, - Ephemeris = { + Ephemeris = { Type = "Static", Position = {0, 0, 0, 5} } diff --git a/data/scene/enlilnh/enlilnh.mod b/data/scene/enlilnh/enlilnh.mod index cfd8de50de..497a9d4439 100644 --- a/data/scene/enlilnh/enlilnh.mod +++ b/data/scene/enlilnh/enlilnh.mod @@ -13,9 +13,9 @@ return { Rotation = {2.1, 0, 0}, Scaling = {1.1, 1.1, 1.1}, ScalingExponent = 12, - Source = "tsp/enlil_nh_128_128_16.tsp", + Source = "tsp/enlil_nh_128_128_16.tsp", TransferFunction = "transferfunctions/fire.txt", - BrickSelector = "tf", + BrickSelector = "tf", }, GuiName = "/Volumes/ENLIL New Horizons" } diff --git a/data/scene/ephemeris/ephemeris.mod b/data/scene/ephemeris/ephemeris.mod index 88652db53f..17fae9e0d1 100644 --- a/data/scene/ephemeris/ephemeris.mod +++ b/data/scene/ephemeris/ephemeris.mod @@ -5,12 +5,12 @@ return { Parent = "Root", Renderable = { Type = "RenderableEphemeris", - Textures = { + Textures = { Type = "simple", - Color = "textures/glare_blue.png", - -- need to add different texture - }, - }, + Color = "textures/glare_blue.png", + -- need to add different texture + }, + }, GuiName = "/Solar/Ephemeris" } } \ No newline at end of file diff --git a/data/scene/europa/europa.mod b/data/scene/europa/europa.mod index 48cc2d45bb..4ddba87974 100644 --- a/data/scene/europa/europa.mod +++ b/data/scene/europa/europa.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_EUROPA", -- should exist. - Body = "EUROPA", + Frame = "IAU_EUROPA", -- should exist. + Body = "EUROPA", Geometry = { Type = "SimpleSphere", Radius = { 1.561, 6}, diff --git a/data/scene/ganymede/ganymede.mod b/data/scene/ganymede/ganymede.mod index 3690f595ca..9daaf1e584 100644 --- a/data/scene/ganymede/ganymede.mod +++ b/data/scene/ganymede/ganymede.mod @@ -5,7 +5,7 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_GANYMEDE", -- should exist. + Frame = "IAU_GANYMEDE", -- should exist. Geometry = { Type = "SimpleSphere", Radius = { 2.631, 6}, diff --git a/data/scene/gridEcliptic/gridEcliptic.mod b/data/scene/gridEcliptic/gridEcliptic.mod index c5a96dc112..3aea1790ae 100644 --- a/data/scene/gridEcliptic/gridEcliptic.mod +++ b/data/scene/gridEcliptic/gridEcliptic.mod @@ -3,23 +3,23 @@ return { { Name = "SphericalGrid", Parent = "Root", - Static = true, + Static = true, Renderable = { Type = "RenderableSphericalGrid", - GridType = "ECLIPJ2000", - GridColor = { 0.4, 0.0, 0.0, 1}, - GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0, - -0.9938214 , -0.1109906, -0.0003515167, 0.0, - -0.09647644, 0.8622859, 0.4971472 , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 }, - GridSegments = 36, - }, - Ephemeris = { + GridType = "ECLIPJ2000", + GridColor = { 0.4, 0.0, 0.0, 1}, + GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0, + -0.9938214 , -0.1109906, -0.0003515167, 0.0, + -0.09647644, 0.8622859, 0.4971472 , 0.0, + 0.0 , 0.0 , 0.0 , 1.0 }, + GridSegments = 36, + }, + Ephemeris = { Type = "Static" -- for now, might change. }, - - --[[ - Ephemeris = { + + --[[ + Ephemeris = { Type = "Spice", Body = "EARTH", Reference = "ECLIPJ2000", @@ -27,8 +27,8 @@ return { Kernels = { "kernels/earth.bsp" } - }, - --]] + }, + --]] GuiName = "/Grid/Ecliptic" } } \ No newline at end of file diff --git a/data/scene/gridEquatorial/gridEquatorial.mod b/data/scene/gridEquatorial/gridEquatorial.mod index efcb7d9ca0..e35fdf7ee6 100644 --- a/data/scene/gridEquatorial/gridEquatorial.mod +++ b/data/scene/gridEquatorial/gridEquatorial.mod @@ -3,18 +3,18 @@ return { { Name = "SphericalGrid", Parent = "Root", - Static = true, + Static = true, Renderable = { Type = "RenderableSphericalGrid", - GridType = "ICRF", - GridColor = { 0.0, 0.0, 0.4, 1}, - GridMatrix = { -0.05487554, 0.4941095, -0.8676661, 0.0, - -0.8734371 , -0.4448296, -0.1980764, 0.0, - -0.483835 , 0.7469823, 0.4559838, 0.0, - 0.0 , 0.0 , 0.0 , 1.0 }, - GridSegments = 36, - }, - Ephemeris = { + GridType = "ICRF", + GridColor = { 0.0, 0.0, 0.4, 1}, + GridMatrix = { -0.05487554, 0.4941095, -0.8676661, 0.0, + -0.8734371 , -0.4448296, -0.1980764, 0.0, + -0.483835 , 0.7469823, 0.4559838, 0.0, + 0.0 , 0.0 , 0.0 , 1.0 }, + GridSegments = 36, + }, + Ephemeris = { Type = "Static" -- for now, might change. }, diff --git a/data/scene/gridGalactic/gridGalactic.mod b/data/scene/gridGalactic/gridGalactic.mod index 23558e92d0..95f25afe4f 100644 --- a/data/scene/gridGalactic/gridGalactic.mod +++ b/data/scene/gridGalactic/gridGalactic.mod @@ -3,23 +3,23 @@ return { { Name = "gridGalactic", Parent = "SolarSystem", - Static = true, + Static = true, Renderable = { Type = "RenderableSphericalGrid", - GridType = "GALACTIC", - GridColor = { 0.0, 0.4, 0.4, 1}, - GridMatrix = { 1.0, 0.0, 0.0, 0.0, - 0.0, 1.0, 0.0, 0.0, - 0.0, 0.0, 1.0, 0.0, - 0.0, 0.0, 0.0, 1.0 }, - GridSegments = 36, - }, - Ephemeris = { + GridType = "GALACTIC", + GridColor = { 0.0, 0.4, 0.4, 1}, + GridMatrix = { 1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + 0.0, 0.0, 0.0, 1.0 }, + GridSegments = 36, + }, + Ephemeris = { Type = "Static" -- for now, might change. }, - - --[[ - Ephemeris = { + + --[[ + Ephemeris = { Type = "Spice", Body = "EARTH", Reference = "ECLIPJ2000", @@ -27,8 +27,8 @@ return { Kernels = { "kernels/earth.bsp" } - }, - --]] + }, + --]] GuiName = "/Grid/Galactic" } } \ No newline at end of file diff --git a/data/scene/imageplane/imageplane.mod b/data/scene/imageplane/imageplane.mod index 028fa58b6a..419e651374 100644 --- a/data/scene/imageplane/imageplane.mod +++ b/data/scene/imageplane/imageplane.mod @@ -1,15 +1,15 @@ return { -- Latest image taken by LORRI - { + { Name = "ImagePlane", Parent = "NewHorizons", Renderable = { Type = "RenderablePlaneProjection", - Frame = "IAU_JUPITER", - DefaultTarget = "JUPITER", - Spacecraft = "NEW HORIZONS", - Instrument = "NH_LORRI", - Moving = false, + Frame = "IAU_JUPITER", + DefaultTarget = "JUPITER", + Spacecraft = "NEW HORIZONS", + Instrument = "NH_LORRI", + Moving = false, Texture = "textures/test.jpg", }, Ephemeris = { @@ -17,17 +17,17 @@ return { Position = {0, 0, 0, 1} }, }, - -- LORRI FoV square - { + -- LORRI FoV square + { Name = "ImagePlane2", Parent = "NewHorizons", Renderable = { Type = "RenderablePlaneProjection", - Frame = "IAU_JUPITER", - DefaultTarget = "JUPITER", - Spacecraft = "NEW HORIZONS", - Instrument = "NH_LORRI", - Moving = true, + Frame = "IAU_JUPITER", + DefaultTarget = "JUPITER", + Spacecraft = "NEW HORIZONS", + Instrument = "NH_LORRI", + Moving = true, Texture = "textures/squarefov.png", }, Ephemeris = { diff --git a/data/scene/io/io.mod b/data/scene/io/io.mod index 717f3e11c9..293e5d2ac4 100644 --- a/data/scene/io/io.mod +++ b/data/scene/io/io.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_IO", -- should exist. - Body = "IO", + Frame = "IAU_IO", -- should exist. + Body = "IO", Geometry = { Type = "SimpleSphere", Radius = { 1.8213, 6 }, @@ -29,7 +29,7 @@ return { Observer = "JUPITER BARYCENTER", Kernels = { --"${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" - "${SPICE}/jup260.bsp", + "${SPICE}/jup260.bsp", } }, Rotation = { diff --git a/data/scene/jupiter/jupiter.mod b/data/scene/jupiter/jupiter.mod index cfbcda68b1..9c7ef970ac 100644 --- a/data/scene/jupiter/jupiter.mod +++ b/data/scene/jupiter/jupiter.mod @@ -3,7 +3,7 @@ return { { Name = "JupiterBarycenter", Parent = "SolarSystemBarycenter", - Ephemeris = { + Ephemeris = { Type = "Spice", Body = "JUPITER BARYCENTER", Reference = "ECLIPJ2000", @@ -11,7 +11,7 @@ return { Kernels = { "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp" } - }, + }, }, -- Jupiter module { @@ -19,8 +19,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_JUPITER", - Body = "JUPITER BARYCENTER", + Frame = "IAU_JUPITER", + Body = "JUPITER BARYCENTER", Geometry = { Type = "SimpleSphere", Radius = { 0.71492, 8 }, @@ -36,7 +36,7 @@ return { MieColor = {1.0, 1.0, 1.0} } }, - Ephemeris = { + Ephemeris = { Type = "Static" -- jupiter is at its barycenter }, Rotation = { diff --git a/data/scene/mars/mars.mod b/data/scene/mars/mars.mod index bd6b5f6cb3..003c604e57 100644 --- a/data/scene/mars/mars.mod +++ b/data/scene/mars/mars.mod @@ -14,8 +14,8 @@ return { Parent = "MarsBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_MARS", - Body = "MARS BARYCENTER", + Frame = "IAU_MARS", + Body = "MARS BARYCENTER", Geometry = { Type = "SimpleSphere", Radius = { 6.390, 6 }, diff --git a/data/scene/mercury/mercury.mod b/data/scene/mercury/mercury.mod index 72a9ab46f5..5f2ec68a6c 100644 --- a/data/scene/mercury/mercury.mod +++ b/data/scene/mercury/mercury.mod @@ -14,8 +14,8 @@ return { Parent = "MercuryBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_MERCURY", - Body = "MERCURY", + Frame = "IAU_MERCURY", + Body = "MERCURY", Geometry = { Type = "SimpleSphere", Radius = { 2.440, 6 }, diff --git a/data/scene/neptune/neptune.mod b/data/scene/neptune/neptune.mod index 471583b1a7..a0a55c47f3 100644 --- a/data/scene/neptune/neptune.mod +++ b/data/scene/neptune/neptune.mod @@ -14,8 +14,8 @@ return { Parent = "NeptuneBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_NEPTUNE", - Body = "NEPTUNE BARYCENTER", + Frame = "IAU_NEPTUNE", + Body = "NEPTUNE BARYCENTER", Geometry = { Type = "SimpleSphere", Radius = { 2.4622 , 7 }, diff --git a/data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.mod b/data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.mod index fae2d6575a..3f380d86fb 100644 --- a/data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.mod +++ b/data/scene/newhorizons/jupiter/callistoprojection/callistoprojection.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_CALLISTO", - Body = "CALLISTO", + Frame = "IAU_CALLISTO", + Body = "CALLISTO", Geometry = { Type = "SimpleSphere", Radius = { 1.8213, 6 }, @@ -15,28 +15,28 @@ return { Textures = { Type = "simple", Color = "textures/callisto.jpg", - Project = "textures/defaultProj.png", - Sequencing = "true", + Project = "textures/defaultProj.png", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - Observer = "NEW HORIZONS", - Target = "CALLISTO", - Aberration = "NONE", - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + Projection = { + Observer = "NEW HORIZONS", + Target = "CALLISTO", + Aberration = "NONE", + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { "JUPITER", "IO", "EUROPA", "GANYMEDE", "CALLISTO" } @@ -67,7 +67,7 @@ return { Billboard = true, Texture = "textures/Callisto-Text.png" }, - Ephemeris = { + Ephemeris = { Type = "Static", Position = {0, -1, 0, 7} } @@ -85,7 +85,7 @@ return { TropicalOrbitPeriod = 80 , EarthOrbitRatio = 0.04, DayLength = 9.9259, - LineFade = 2.0, + LineFade = 2.0, Textures = { Type = "simple", Color = "${COMMON_MODULE}/textures/glare_blue.png", diff --git a/data/scene/newhorizons/jupiter/europaprojection/europaprojection.mod b/data/scene/newhorizons/jupiter/europaprojection/europaprojection.mod index dc6141286c..1d3715f6c7 100644 --- a/data/scene/newhorizons/jupiter/europaprojection/europaprojection.mod +++ b/data/scene/newhorizons/jupiter/europaprojection/europaprojection.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_EUROPA", - Body = "EUROPA", + Frame = "IAU_EUROPA", + Body = "EUROPA", Geometry = { Type = "SimpleSphere", Radius = { 1.8213, 6 }, @@ -15,28 +15,28 @@ return { Textures = { Type = "simple", Color = "textures/europa.jpg", - Project = "textures/defaultProj.png", - Sequencing = "true", + Project = "textures/defaultProj.png", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - Observer = "NEW HORIZONS", - Target = "EUROPA", - Aberration = "NONE", - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + Projection = { + Observer = "NEW HORIZONS", + Target = "EUROPA", + Aberration = "NONE", + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { "JUPITER", "IO", "EUROPA", "GANYMEDE", "CALLISTO" } @@ -85,7 +85,7 @@ return { TropicalOrbitPeriod = 80 , EarthOrbitRatio = 0.009, DayLength = 9.9259, - LineFade = 2.0, + LineFade = 2.0, Textures = { Type = "simple", Color = "${COMMON_MODULE}/textures/glare_blue.png", diff --git a/data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.mod b/data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.mod index 97d1683311..abc0c2ecdc 100644 --- a/data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.mod +++ b/data/scene/newhorizons/jupiter/ganymedeprojection/ganymedeprojection.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_GANYMEDE", - Body = "GANYMEDE", + Frame = "IAU_GANYMEDE", + Body = "GANYMEDE", Geometry = { Type = "SimpleSphere", Radius = { 1.8213, 6 }, @@ -15,28 +15,28 @@ return { Textures = { Type = "simple", Color = "textures/ganymede.jpg", - Project = "textures/defaultProj.png", - Sequencing = "true", + Project = "textures/defaultProj.png", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - Observer = "NEW HORIZONS", - Target = "GANYMEDE", - Aberration = "NONE", - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + Projection = { + Observer = "NEW HORIZONS", + Target = "GANYMEDE", + Aberration = "NONE", + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { "JUPITER", "IO", "EUROPA", "GANYMEDE", "CALLISTO" } @@ -85,7 +85,7 @@ return { TropicalOrbitPeriod = 80 , EarthOrbitRatio = 0.018, DayLength = 9.9259, - LineFade = 2.0, + LineFade = 2.0, Textures = { Type = "simple", Color = "${COMMON_MODULE}/textures/glare_blue.png", diff --git a/data/scene/newhorizons/jupiter/ioprojection/ioprojection.mod b/data/scene/newhorizons/jupiter/ioprojection/ioprojection.mod index efab4ba1ea..e956081077 100644 --- a/data/scene/newhorizons/jupiter/ioprojection/ioprojection.mod +++ b/data/scene/newhorizons/jupiter/ioprojection/ioprojection.mod @@ -5,8 +5,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_IO", - Body = "IO", + Frame = "IAU_IO", + Body = "IO", Geometry = { Type = "SimpleSphere", Radius = { 1.8213, 6 }, @@ -15,28 +15,28 @@ return { Textures = { Type = "simple", Color = "textures/io.jpg", - Project = "textures/defaultProj.png", - Sequencing = "true", + Project = "textures/defaultProj.png", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - Observer = "NEW HORIZONS", - Target = "IO", - Aberration = "NONE", - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + Projection = { + Observer = "NEW HORIZONS", + Target = "IO", + Aberration = "NONE", + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { "JUPITER", "IO", "EUROPA", "GANYMEDE", "CALLISTO" } @@ -85,7 +85,7 @@ return { TropicalOrbitPeriod = 100 , EarthOrbitRatio = 0.0045, DayLength = 9.9259, - LineFade = 2.0, + LineFade = 2.0, Textures = { Type = "simple", Color = "${COMMON_MODULE}/textures/glare_blue.png", diff --git a/data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.mod b/data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.mod index 3da31853b4..5853649995 100644 --- a/data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.mod +++ b/data/scene/newhorizons/jupiter/jupiterprojection/jupiterprojection.mod @@ -3,7 +3,7 @@ return { { Name = "JupiterBarycenter", Parent = "SolarSystemBarycenter", - Ephemeris = { + Ephemeris = { Type = "Spice", Body = "JUPITER BARYCENTER", Reference = "ECLIPJ2000", @@ -11,7 +11,7 @@ return { Kernels = { "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp", } - }, + }, }, -- JupiterProjection module { @@ -19,8 +19,8 @@ return { Parent = "JupiterBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_JUPITER", - Body = "JUPITER", + Frame = "IAU_JUPITER", + Body = "JUPITER", Geometry = { Type = "SimpleSphere", Radius = { 0.71492, 8 }, @@ -29,71 +29,71 @@ return { Textures = { Type = "simple", Color = "textures/jupiterFlipped_low.jpg", - Project = "textures/lorriTest1.jpg", - Sequencing = "true", + Project = "textures/lorriTest1.jpg", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - --Sequence = "F:/JupiterFullSequence", - Sequence = "${OPENSPACE_DATA}/scene/newhorizons/jupiter/jupiterprojection/ProjectionsOfInterest", + Projection = { + --Sequence = "F:/JupiterFullSequence", + Sequence = "${OPENSPACE_DATA}/scene/newhorizons/jupiter/jupiterprojection/ProjectionsOfInterest", SequenceType = "image-sequence", - Observer = "NEW HORIZONS", - Target = "JUPITER", - Aberration = "NONE", - }, - DataInputTranslation = { - Instrument = { - LORRI = { - DetectorType = "Camera", - Spice = {"NH_LORRI"}, - }, - }, - Target ={ - Read = { - "TARGET_NAME", - "INSTRUMENT_HOST_NAME", - "INSTRUMENT_ID", - "START_TIME", - "STOP_TIME", - "DETECTOR_TYPE", - --"SEQUENCE_ID", - }, - Convert = { - JRINGS = {"IMAGE-PLANE" }, - J1IO = {"IO" }, - J2EUROPA = {"EUROPA" }, - J6HIMALIA = {"IMAGE-PLANE" }, - J7ELARA = {"IMAGE-PLANE" }, - CALIBRATION = {"CALIBRATION" }, - JUPITER = {"JUPITER" }, - CALLISTO = {"CALLISTO" }, - GANYMEDE = {"GANYMEDE" }, - EARTH = {"EARTH" }, - NEWHORIZONS = {"NEW HORIZONS"}, - CCD = {"CAMERA" }, - FRAMECCD = {"SCANNER" }, - }, - }, - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + Observer = "NEW HORIZONS", + Target = "JUPITER", + Aberration = "NONE", + }, + DataInputTranslation = { + Instrument = { + LORRI = { + DetectorType = "Camera", + Spice = {"NH_LORRI"}, + }, + }, + Target ={ + Read = { + "TARGET_NAME", + "INSTRUMENT_HOST_NAME", + "INSTRUMENT_ID", + "START_TIME", + "STOP_TIME", + "DETECTOR_TYPE", + --"SEQUENCE_ID", + }, + Convert = { + JRINGS = {"IMAGE-PLANE" }, + J1IO = {"IO" }, + J2EUROPA = {"EUROPA" }, + J6HIMALIA = {"IMAGE-PLANE" }, + J7ELARA = {"IMAGE-PLANE" }, + CALIBRATION = {"CALIBRATION" }, + JUPITER = {"JUPITER" }, + CALLISTO = {"CALLISTO" }, + GANYMEDE = {"GANYMEDE" }, + EARTH = {"EARTH" }, + NEWHORIZONS = {"NEW HORIZONS"}, + CCD = {"CAMERA" }, + FRAMECCD = {"SCANNER" }, + }, + }, + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { "JUPITER", "IO", "EUROPA", "GANYMEDE", "CALLISTO" } }, - Ephemeris = { - Type = "Static" + Ephemeris = { + Type = "Static" }, Rotation = { @@ -139,5 +139,5 @@ return { }, GuiName = "/Solar/JupiterTrail" } - + } diff --git a/data/scene/newhorizons/newhorizonsfov/newhorizonsfov.mod b/data/scene/newhorizons/newhorizonsfov/newhorizonsfov.mod index 87b3fda155..d6c12a2f94 100644 --- a/data/scene/newhorizons/newhorizonsfov/newhorizonsfov.mod +++ b/data/scene/newhorizons/newhorizonsfov/newhorizonsfov.mod @@ -218,7 +218,7 @@ return { }, GuiName = "/Solar/NH_RALPH_MVIC_METHANE" }, - -- NewHorizonsFov module NH_RALPH_MVIC_NIR + -- NewHorizonsFov module NH_RALPH_MVIC_NIR { Name = "NH_RALPH_MVIC_NIR", Parent = "NewHorizons", @@ -245,7 +245,7 @@ return { }, GuiName = "/Solar/NH_RALPH_MVIC_METHANE" }, - -- NewHorizonsFov module NH_ALICE_AIRGLOW + -- NewHorizonsFov module NH_ALICE_AIRGLOW { Name = "NH_ALICE_AIRGLOW", Parent = "NewHorizons", @@ -272,7 +272,7 @@ return { }, GuiName = "/Solar/NH_ALICE_AIRGLOW" }, - -- NewHorizonsFov module NH_ALICE_SOC + -- NewHorizonsFov module NH_ALICE_SOC { Name = "NH_ALICE_SOC", Parent = "NewHorizons", diff --git a/data/scene/newhorizons/newhorizonspath/newhorizonspath.mod b/data/scene/newhorizons/newhorizonspath/newhorizonspath.mod index d03c0bbcb2..6ebf488e5f 100644 --- a/data/scene/newhorizons/newhorizonspath/newhorizonspath.mod +++ b/data/scene/newhorizons/newhorizonspath/newhorizonspath.mod @@ -8,13 +8,13 @@ return { Body = "NEW HORIZONS", Frame = "GALACTIC", Observer = "SUN", - RGB = { 0.8, 0.7, 0.7 }, - Textures = { + RGB = { 0.8, 0.7, 0.7 }, + Textures = { Type = "simple", - Color = "textures/glare_blue.png", - -- need to add different texture - }, - }, + Color = "textures/glare_blue.png", + -- need to add different texture + }, + }, GuiName = "/Solar/NewHorizonsPath" } } \ No newline at end of file diff --git a/data/scene/newhorizons/newhorizonstrail/newhorizonstrail.mod b/data/scene/newhorizons/newhorizonstrail/newhorizonstrail.mod index a7135a78a4..ac6d22401b 100644 --- a/data/scene/newhorizons/newhorizonstrail/newhorizonstrail.mod +++ b/data/scene/newhorizons/newhorizonstrail/newhorizonstrail.mod @@ -8,16 +8,16 @@ return { Body = "NEW HORIZONS", Frame = "GALACTIC", Observer = "SUN", - RGB = { 0.1,0.01,0.30 }, - TropicalOrbitPeriod = 6330.595 , - EarthOrbitRatio = 0.857, - DayLength = 9.9259, - Textures = { + RGB = { 0.1,0.01,0.30 }, + TropicalOrbitPeriod = 6330.595 , + EarthOrbitRatio = 0.857, + DayLength = 9.9259, + Textures = { Type = "simple", - Color = "textures/glare_blue.png", - -- need to add different texture - }, - }, + Color = "textures/glare_blue.png", + -- need to add different texture + }, + }, GuiName = "/Solar/NewHorizonsTrail" } } \ No newline at end of file diff --git a/data/scene/newhorizons/pluto/charonprojection/charonprojection.mod b/data/scene/newhorizons/pluto/charonprojection/charonprojection.mod index 0f87f05ae9..70ba1533aa 100644 --- a/data/scene/newhorizons/pluto/charonprojection/charonprojection.mod +++ b/data/scene/newhorizons/pluto/charonprojection/charonprojection.mod @@ -16,8 +16,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_CHARON", - Body = "CHARON", + Frame = "IAU_CHARON", + Body = "CHARON", Geometry = { Type = "SimpleSphere", Radius = { 6.035 , 5 }, @@ -26,28 +26,28 @@ return { Textures = { Type = "simple", Color = "textures/charon_highres.jpg", - Project = "textures/defaultProj.png", - Sequencing = "true", + Project = "textures/defaultProj.png", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - Observer = "NEW HORIZONS", - Target = "CHARON", - Aberration = "NONE", - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + Projection = { + Observer = "NEW HORIZONS", + Target = "CHARON", + Aberration = "NONE", + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { "PLUTO", "CHARON" @@ -82,18 +82,18 @@ return { Position = {0, -10, 0, 5} } }, - { + { Name = "CharonShadow", Parent = "Charon", Renderable = { Type = "RenderableShadowCylinder", - TerminatorType = "PENUMBRAL", - LightSource = "SUN", - Observer = "NEW HORIZONS", - Body = "CHARON", - BodyFrame = "IAU_CHARON", - MainFrame = "GALACTIC", - Aberration = "NONE", + TerminatorType = "PENUMBRAL", + LightSource = "SUN", + Observer = "NEW HORIZONS", + Body = "CHARON", + BodyFrame = "IAU_CHARON", + MainFrame = "GALACTIC", + Aberration = "NONE", }, Ephemeris = { Type = "Static", diff --git a/data/scene/newhorizons/pluto/hydra/hydra.mod b/data/scene/newhorizons/pluto/hydra/hydra.mod index e6f27bbff5..46b4d774da 100644 --- a/data/scene/newhorizons/pluto/hydra/hydra.mod +++ b/data/scene/newhorizons/pluto/hydra/hydra.mod @@ -15,8 +15,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "HYDRA", + Frame = "IAU_PLUTO", + Body = "HYDRA", Geometry = { Type = "SimpleSphere", Radius = { 0.53 , 5 }, @@ -83,5 +83,5 @@ return { }, GuiName = "/Solar/HydraTrail" } - + } diff --git a/data/scene/newhorizons/pluto/kerberos/kerberos.mod b/data/scene/newhorizons/pluto/kerberos/kerberos.mod index 75720abde4..382f67bcfd 100644 --- a/data/scene/newhorizons/pluto/kerberos/kerberos.mod +++ b/data/scene/newhorizons/pluto/kerberos/kerberos.mod @@ -15,8 +15,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "KERBEROS", + Frame = "IAU_PLUTO", + Body = "KERBEROS", Geometry = { Type = "SimpleSphere", Radius = { 0.1 , 5 }, @@ -83,5 +83,5 @@ return { }, GuiName = "/Solar/KerberosTrail" } - + } diff --git a/data/scene/newhorizons/pluto/nix/nix.mod b/data/scene/newhorizons/pluto/nix/nix.mod index 8e56474f56..38f3186226 100644 --- a/data/scene/newhorizons/pluto/nix/nix.mod +++ b/data/scene/newhorizons/pluto/nix/nix.mod @@ -15,8 +15,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "NIX", + Frame = "IAU_PLUTO", + Body = "NIX", Geometry = { Type = "SimpleSphere", Radius = { 0.45 , 5 }, @@ -83,5 +83,5 @@ return { }, GuiName = "/Solar/NixTrail" } - + } diff --git a/data/scene/newhorizons/pluto/plutoprojection/plutoprojection.mod b/data/scene/newhorizons/pluto/plutoprojection/plutoprojection.mod index 1e2f8a3d17..c61baa4836 100644 --- a/data/scene/newhorizons/pluto/plutoprojection/plutoprojection.mod +++ b/data/scene/newhorizons/pluto/plutoprojection/plutoprojection.mod @@ -28,8 +28,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanetProjection", - Frame = "IAU_PLUTO", - Body = "PLUTO", + Frame = "IAU_PLUTO", + Body = "PLUTO", Geometry = { Type = "SimpleSphere", Radius = { 1.173 , 6 }, @@ -41,116 +41,116 @@ return { Color = "textures/Shenk_180.jpg", -- Color = "textures/pluto_large.jpg", -- Color = "textures/white.png", - Project = "textures/3.jpg", - Sequencing = "true", + Project = "textures/3.jpg", + Sequencing = "true", }, Atmosphere = { Type = "Nishita", -- for example, values missing etc etc MieFactor = 1.0, MieColor = {1.0, 1.0, 1.0} }, - Projection = { - Sequence = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/images", - EventFile = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt", + Projection = { + Sequence = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/images", + EventFile = "${OPENSPACE_DATA}/scene/newhorizons/pluto/plutoprojection/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt", SequenceType = "hybrid", - Observer = "NEW HORIZONS", - Target = "PLUTO", - Aberration = "NONE", - }, - DataInputTranslation = { - Instrument = { - LORRI = { - DetectorType = "Camera", - Spice = {"NH_LORRI"}, - }, - RALPH_MVIC_PAN_FRAME = { - DetectorType = "Scanner", - StopCommand = "RALPH_ABORT", - Spice = {"NH_RALPH_MVIC_FT"}, - }, - RALPH_MVIC_COLOR = { - DetectorType = "Scanner", - StopCommand = "END_NOM", - Spice = { "NH_RALPH_MVIC_NIR", - "NH_RALPH_MVIC_METHANE", - "NH_RALPH_MVIC_RED", - "NH_RALPH_MVIC_BLUE" }, - }, - RALPH_LEISA = { - DetectorType = "Scanner", - StopCommand = "END_NOM", - Spice = {"NH_RALPH_LEISA"}, - }, - RALPH_MVIC_PAN1 = { - DetectorType = "Scanner", - StopCommand = "END_NOM", - Spice = {"NH_RALPH_MVIC_PAN1"}, - }, - RALPH_MVIC_PAN2 = { - DetectorType = "Scanner", - StopCommand = "END_NOM", - Spice = {"NH_RALPH_MVIC_PAN2"}, - }, - ALICE_Use_AIRGLOW = { - DetectorType = "Scanner", - StopCommand = "ALICE_END_PIXELLIST", - Spice = {"NH_ALICE_AIRGLOW"}, - }, - ALICE_Use_AIRGLOW = { - DetectorType = "Scanner", - StopCommand = "ALICE_END_HISTOGRAM", - Spice = {"NH_ALICE_AIRGLOW"}, - }, - ALICE_Use_SOCC = { - DetectorType = "Scanner", - StopCommand = "ALICE_END_PIXELLIST", - Spice = {"NH_ALICE_SOC"}, - }, - ALICE_Use_SOCC = { - DetectorType = "Scanner", - StopCommand = "ALICE_END_HISTOGRAM", - Spice = {"NH_ALICE_SOC"}, - }, + Observer = "NEW HORIZONS", + Target = "PLUTO", + Aberration = "NONE", + }, + DataInputTranslation = { + Instrument = { + LORRI = { + DetectorType = "Camera", + Spice = {"NH_LORRI"}, + }, + RALPH_MVIC_PAN_FRAME = { + DetectorType = "Scanner", + StopCommand = "RALPH_ABORT", + Spice = {"NH_RALPH_MVIC_FT"}, + }, + RALPH_MVIC_COLOR = { + DetectorType = "Scanner", + StopCommand = "END_NOM", + Spice = { "NH_RALPH_MVIC_NIR", + "NH_RALPH_MVIC_METHANE", + "NH_RALPH_MVIC_RED", + "NH_RALPH_MVIC_BLUE" }, + }, + RALPH_LEISA = { + DetectorType = "Scanner", + StopCommand = "END_NOM", + Spice = {"NH_RALPH_LEISA"}, + }, + RALPH_MVIC_PAN1 = { + DetectorType = "Scanner", + StopCommand = "END_NOM", + Spice = {"NH_RALPH_MVIC_PAN1"}, + }, + RALPH_MVIC_PAN2 = { + DetectorType = "Scanner", + StopCommand = "END_NOM", + Spice = {"NH_RALPH_MVIC_PAN2"}, + }, + ALICE_Use_AIRGLOW = { + DetectorType = "Scanner", + StopCommand = "ALICE_END_PIXELLIST", + Spice = {"NH_ALICE_AIRGLOW"}, + }, + ALICE_Use_AIRGLOW = { + DetectorType = "Scanner", + StopCommand = "ALICE_END_HISTOGRAM", + Spice = {"NH_ALICE_AIRGLOW"}, + }, + ALICE_Use_SOCC = { + DetectorType = "Scanner", + StopCommand = "ALICE_END_PIXELLIST", + Spice = {"NH_ALICE_SOC"}, + }, + ALICE_Use_SOCC = { + DetectorType = "Scanner", + StopCommand = "ALICE_END_HISTOGRAM", + Spice = {"NH_ALICE_SOC"}, + }, REX_START = { DetectorType = "Scanner", StopCommand = "REX_MODE_OFF", Spice = { "NH_REX" }, } - }, - Target ={ - Read = { - "TARGET_NAME", - "INSTRUMENT_HOST_NAME", - "INSTRUMENT_ID", - "START_TIME", - "STOP_TIME", - "DETECTOR_TYPE", - --"SEQUENCE_ID", - }, - Convert = { - PLUTO = {"PLUTO" }, - NEWHORIZONS = {"NEW HORIZONS"}, - CCD = {"CAMERA" }, - FRAMECCD = {"SCANNER" }, - }, - }, - }, - Instrument = { - Name = "NH_LORRI", - Method = "ELLIPSOID", - Aberration = "NONE", - Fovy = 0.2907, - Aspect = 1, - Near = 0.2, - Far = 10000, - }, + }, + Target ={ + Read = { + "TARGET_NAME", + "INSTRUMENT_HOST_NAME", + "INSTRUMENT_ID", + "START_TIME", + "STOP_TIME", + "DETECTOR_TYPE", + --"SEQUENCE_ID", + }, + Convert = { + PLUTO = {"PLUTO" }, + NEWHORIZONS = {"NEW HORIZONS"}, + CCD = {"CAMERA" }, + FRAMECCD = {"SCANNER" }, + }, + }, + }, + Instrument = { + Name = "NH_LORRI", + Method = "ELLIPSOID", + Aberration = "NONE", + Fovy = 0.2907, + Aspect = 1, + Near = 0.2, + Far = 10000, + }, PotentialTargets = { - "PLUTO", - "CHARON", - "NIX", - "HYDRA", - "P5", - "P4", + "PLUTO", + "CHARON", + "NIX", + "HYDRA", + "P5", + "P4", } }, Ephemeris = { @@ -167,7 +167,7 @@ return { }, GuiName = "/Solar/Planets/Pluto" }, - { + { Name = "PlutoBarycenterLabel", Parent = "PlutoBarycenter", Renderable = { @@ -201,7 +201,7 @@ return { Position = {0, -20, 0, 5} } }, - { + { Name = "PlutoTexture", Parent = "PlutoProjection", Renderable = { @@ -209,7 +209,7 @@ return { Size = {1.0, 6.4}, Origin = "Center", Billboard = true, - ProjectionListener = true, + ProjectionListener = true, Texture = "textures/Pluto-Text.png" }, Ephemeris = { @@ -217,25 +217,25 @@ return { Position = {0, 0, 40, 5} } }, - { + { Name = "PlutoShadow", Parent = "PlutoProjection", Renderable = { Type = "RenderableShadowCylinder", - TerminatorType = "PENUMBRAL", - LightSource = "SUN", - Observer = "NEW HORIZONS", - Body = "PLUTO", - BodyFrame = "IAU_PLUTO", - MainFrame = "GALACTIC", - Aberration = "NONE", + TerminatorType = "PENUMBRAL", + LightSource = "SUN", + Observer = "NEW HORIZONS", + Body = "PLUTO", + BodyFrame = "IAU_PLUTO", + MainFrame = "GALACTIC", + Aberration = "NONE", }, Ephemeris = { Type = "Static", Position = {0, 0, 0, 5} } }, - -- PlutoBarycentricTrail module + -- PlutoBarycentricTrail module { Name = "PlutoBarycentricTrail", Parent = "PlutoBarycenter", @@ -276,5 +276,5 @@ return { }, }, GuiName = "/Solar/PlutoTrail" - } + } } diff --git a/data/scene/newhorizons/pluto/styx/styx.mod b/data/scene/newhorizons/pluto/styx/styx.mod index 56523e95da..5b49230388 100644 --- a/data/scene/newhorizons/pluto/styx/styx.mod +++ b/data/scene/newhorizons/pluto/styx/styx.mod @@ -15,8 +15,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "STYX", + Frame = "IAU_PLUTO", + Body = "STYX", Geometry = { Type = "SimpleSphere", Radius = { 0.75 , 4 }, @@ -83,5 +83,5 @@ return { }, GuiName = "/Solar/CharonTrail" } - + } diff --git a/data/scene/planetCoordinates/planetCoordinates.mod b/data/scene/planetCoordinates/planetCoordinates.mod index f3408cacb6..81924709d2 100644 --- a/data/scene/planetCoordinates/planetCoordinates.mod +++ b/data/scene/planetCoordinates/planetCoordinates.mod @@ -3,21 +3,21 @@ return { { Name = "PlanetCoordinates", Parent = "JupiterBarycenter", - Static = true, + Static = true, Renderable = { Type = "RenderableSphericalGrid", - GridType = "GALACTIC", - GridColor = { 0.2, 0.2, 0.2, 1}, - ParentsRotation = "IAU_JUPITER", - GridSegments = 36, - GridRadius = { 0.72, 8 }, - }, - Ephemeris = { + GridType = "GALACTIC", + GridColor = { 0.2, 0.2, 0.2, 1}, + ParentsRotation = "IAU_JUPITER", + GridSegments = 36, + GridRadius = { 0.72, 8 }, + }, + Ephemeris = { Type = "Static" -- for now, might change. }, - - --[[ - Ephemeris = { + + --[[ + Ephemeris = { Type = "Spice", Body = "EARTH", Reference = "ECLIPJ2000", @@ -25,8 +25,8 @@ return { Kernels = { "kernels/earth.bsp" } - }, - --]] + }, + --]] GuiName = "/Grid/Galactic" } } \ No newline at end of file diff --git a/data/scene/pluto/pluto.mod b/data/scene/pluto/pluto.mod index 493bb5601f..830e130226 100644 --- a/data/scene/pluto/pluto.mod +++ b/data/scene/pluto/pluto.mod @@ -21,8 +21,8 @@ return { Parent = "PlutoBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "PLUTO", + Frame = "IAU_PLUTO", + Body = "PLUTO", Geometry = { Type = "SimpleSphere", Radius = { 1.173 , 6 }, @@ -46,7 +46,7 @@ return { Kernels = { "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp", -- "${OPENSPACE_DATA}/spice/Pluto/EPHEMERIDES/nh_plu017.bsp" - -- "C:/Users/michal/NewHorizons/SPICE/nh_plu017.bsp" + -- "C:/Users/michal/NewHorizons/SPICE/nh_plu017.bsp" } }, Rotation = { @@ -56,7 +56,7 @@ return { }, GuiName = "/Solar/Planets/Pluto" }, - --[[ + --[[ -- PlutoTrail module { Name = "PlutoTrail", diff --git a/data/scene/saturn/saturn.mod b/data/scene/saturn/saturn.mod index 7fc7f83d1e..be6e518e22 100644 --- a/data/scene/saturn/saturn.mod +++ b/data/scene/saturn/saturn.mod @@ -14,8 +14,8 @@ return { Parent = "SaturnBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_SATURN", - Body = "SATURN BARYCENTER", + Frame = "IAU_SATURN", + Body = "SATURN BARYCENTER", Geometry = { Type = "SimpleSphere", Radius = { 5.8232, 7 }, diff --git a/data/scene/sun/sun.mod b/data/scene/sun/sun.mod index dbab164127..288335bb39 100644 --- a/data/scene/sun/sun.mod +++ b/data/scene/sun/sun.mod @@ -4,8 +4,8 @@ return { Name = "SolarSystemBarycenter", Parent = "SolarSystem", Ephemeris = { - Type = "Static", - }, + Type = "Static", + }, }, -- Sun module @@ -14,8 +14,8 @@ return { Parent = "SolarSystemBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_SUN", - Body = "SUN", + Frame = "IAU_SUN", + Body = "SUN", Geometry = { Type = "SimpleSphere", Radius = { 2.783200, 9 }, @@ -72,7 +72,7 @@ return { Billboard = true, Texture = "textures/marker.png" }, - Ephemeris = { + Ephemeris = { Type = "Static", Position = {0, 0, 0, 5} } diff --git a/data/scene/uranus/uranus.mod b/data/scene/uranus/uranus.mod index b1cade2a15..473fe725b7 100644 --- a/data/scene/uranus/uranus.mod +++ b/data/scene/uranus/uranus.mod @@ -14,8 +14,8 @@ return { Parent = "UranusBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_URANUS", - Body = "URANUS BARYCENTER", + Frame = "IAU_URANUS", + Body = "URANUS BARYCENTER", Geometry = { Type = "SimpleSphere", Radius = { 2.5362 , 7 }, diff --git a/data/scene/venus/venus.mod b/data/scene/venus/venus.mod index faca7a5467..753e164b55 100644 --- a/data/scene/venus/venus.mod +++ b/data/scene/venus/venus.mod @@ -14,8 +14,8 @@ return { Parent = "VenusBarycenter", Renderable = { Type = "RenderablePlanet", - Frame = "IAU_VENUS", - Body = "VENUS", + Frame = "IAU_VENUS", + Body = "VENUS", Geometry = { Type = "SimpleSphere", Radius = { 3.760, 6 }, diff --git a/src/interaction/luaconsole_lua.inl b/src/interaction/luaconsole_lua.inl index 72c9b6fabc..99497bfaeb 100644 --- a/src/interaction/luaconsole_lua.inl +++ b/src/interaction/luaconsole_lua.inl @@ -32,12 +32,12 @@ namespace luascriptfunctions { * Shows the console */ int show(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 0) - return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 0) + return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); - OsEng.console().setVisible(true); - return 0; + OsEng.console().setVisible(true); + return 0; } /** @@ -46,12 +46,12 @@ int show(lua_State* L) { * Hides the console */ int hide(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 0) - return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 0) + return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); - OsEng.console().setVisible(false); - return 0; + OsEng.console().setVisible(false); + return 0; } /** @@ -60,12 +60,12 @@ int hide(lua_State* L) { * Toggles the console */ int toggle(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 0) - return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 0) + return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); - OsEng.console().toggleVisibility(); - return 0; + OsEng.console().toggleVisibility(); + return 0; } } // namespace luascriptfunctions diff --git a/src/network/parallelconnection_lua.inl b/src/network/parallelconnection_lua.inl index 6361b3038a..59ef2b3730 100644 --- a/src/network/parallelconnection_lua.inl +++ b/src/network/parallelconnection_lua.inl @@ -33,118 +33,118 @@ namespace luascriptfunctions { */ int setPort(lua_State* L) { - const bool isFunction = (lua_isfunction(L, -1) != 0); - if (isFunction) { - // If the top of the stack is a function, it is ourself - const char* msg = lua_pushfstring(L, "method called without argument"); - return luaL_error(L, "bad argument (%s)", msg); - } + const bool isFunction = (lua_isfunction(L, -1) != 0); + if (isFunction) { + // If the top of the stack is a function, it is ourself + const char* msg = lua_pushfstring(L, "method called without argument"); + return luaL_error(L, "bad argument (%s)", msg); + } - const bool isNumber = (lua_isnumber(L, -1) != 0); - if (isNumber) { - int value = lua_tonumber(L, -1); - std::string port = std::to_string(value); + const bool isNumber = (lua_isnumber(L, -1) != 0); + if (isNumber) { + int value = lua_tonumber(L, -1); + std::string port = std::to_string(value); if(OsEng.isMaster()){ OsEng.parallelConnection().setPort(port); } - return 0; - } - else { - const char* msg = lua_pushfstring(L, "%s expected, got %s", - lua_typename(L, LUA_TNUMBER), luaL_typename(L, -1)); - return luaL_error(L, "bad argument #%d (%s)", 1, msg); - } + return 0; + } + else { + const char* msg = lua_pushfstring(L, "%s expected, got %s", + lua_typename(L, LUA_TNUMBER), luaL_typename(L, -1)); + return luaL_error(L, "bad argument #%d (%s)", 1, msg); + } - return 0; + return 0; } int setAddress(lua_State* L) { - const bool isFunction = (lua_isfunction(L, -1) != 0); - if (isFunction) { - // If the top of the stack is a function, it is ourself - const char* msg = lua_pushfstring(L, "method called without argument"); - return luaL_error(L, "bad argument (%s)", msg); - } + const bool isFunction = (lua_isfunction(L, -1) != 0); + if (isFunction) { + // If the top of the stack is a function, it is ourself + const char* msg = lua_pushfstring(L, "method called without argument"); + return luaL_error(L, "bad argument (%s)", msg); + } - const int type = lua_type(L, -1); - if (type == LUA_TSTRING) { - std::string address = luaL_checkstring(L, -1); + const int type = lua_type(L, -1); + if (type == LUA_TSTRING) { + std::string address = luaL_checkstring(L, -1); if(OsEng.isMaster()){ OsEng.parallelConnection().setAddress(address); } - return 0; - } - else { - const char* msg = lua_pushfstring(L, "%s expected, got %s", - lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); - return luaL_error(L, "bad argument #%d (%s)", 1, msg); - } + return 0; + } + else { + const char* msg = lua_pushfstring(L, "%s expected, got %s", + lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); + return luaL_error(L, "bad argument #%d (%s)", 1, msg); + } - return 0; + return 0; } int setPassword(lua_State* L) { - const bool isFunction = (lua_isfunction(L, -1) != 0); - if (isFunction) { - // If the top of the stack is a function, it is ourself - const char* msg = lua_pushfstring(L, "method called without argument"); - return luaL_error(L, "bad argument (%s)", msg); - } + const bool isFunction = (lua_isfunction(L, -1) != 0); + if (isFunction) { + // If the top of the stack is a function, it is ourself + const char* msg = lua_pushfstring(L, "method called without argument"); + return luaL_error(L, "bad argument (%s)", msg); + } - const int type = lua_type(L, -1); - if (type == LUA_TSTRING) { - std::string pwd = luaL_checkstring(L, -1); + const int type = lua_type(L, -1); + if (type == LUA_TSTRING) { + std::string pwd = luaL_checkstring(L, -1); if(OsEng.isMaster()){ OsEng.parallelConnection().setPassword(pwd); } - return 0; - } - else { - const char* msg = lua_pushfstring(L, "%s expected, got %s", - lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); - return luaL_error(L, "bad argument #%d (%s)", 1, msg); - } + return 0; + } + else { + const char* msg = lua_pushfstring(L, "%s expected, got %s", + lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); + return luaL_error(L, "bad argument #%d (%s)", 1, msg); + } - return 0; + return 0; } int setDisplayName(lua_State* L) { - const bool isFunction = (lua_isfunction(L, -1) != 0); - if (isFunction) { - // If the top of the stack is a function, it is ourself - const char* msg = lua_pushfstring(L, "method called without argument"); - return luaL_error(L, "bad argument (%s)", msg); - } + const bool isFunction = (lua_isfunction(L, -1) != 0); + if (isFunction) { + // If the top of the stack is a function, it is ourself + const char* msg = lua_pushfstring(L, "method called without argument"); + return luaL_error(L, "bad argument (%s)", msg); + } - const int type = lua_type(L, -1); - if (type == LUA_TSTRING) { - std::string name = luaL_checkstring(L, -1); + const int type = lua_type(L, -1); + if (type == LUA_TSTRING) { + std::string name = luaL_checkstring(L, -1); if(OsEng.isMaster()){ OsEng.parallelConnection().setName(name); } - return 0; - } - else { - const char* msg = lua_pushfstring(L, "%s expected, got %s", - lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); - return luaL_error(L, "bad argument #%d (%s)", 1, msg); - } + return 0; + } + else { + const char* msg = lua_pushfstring(L, "%s expected, got %s", + lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); + return luaL_error(L, "bad argument #%d (%s)", 1, msg); + } - return 0; + return 0; } int connect(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 0) - return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 0) + return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); if(OsEng.isMaster()){ OsEng.parallelConnection().clientConnect(); } - return 0; + return 0; } int disconnect(lua_State* L) { diff --git a/src/rendering/renderengine_lua.inl b/src/rendering/renderengine_lua.inl index cd7b78885d..558182620e 100644 --- a/src/rendering/renderengine_lua.inl +++ b/src/rendering/renderengine_lua.inl @@ -39,16 +39,16 @@ int changeCoordinateSystem(lua_State* L) { */ /** - * \ingroup LuaScripts - * takeScreenshot(): - * Save the rendering to an image file - */ + * \ingroup LuaScripts + * takeScreenshot(): + * Save the rendering to an image file + */ int takeScreenshot(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 0) - return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); - OsEng.renderEngine().takeScreenshot(); - return 0; + int nArguments = lua_gettop(L); + if (nArguments != 0) + return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); + OsEng.renderEngine().takeScreenshot(); + return 0; } /** @@ -57,16 +57,16 @@ int takeScreenshot(lua_State* L) { * Set renderer */ int setRenderer(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); - const int type = lua_type(L, -1); + const int type = lua_type(L, -1); if (type != LUA_TSTRING) return luaL_error(L, "Expected argument of type 'bool'"); std::string r = lua_tostring(L, -1); OsEng.renderEngine().setRendererFromString(r); - return 0; + return 0; } /** @@ -75,16 +75,16 @@ int setRenderer(lua_State* L) { * Toggle the visualization of the ABuffer */ int showRenderInformation(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); - const int type = lua_type(L, -1); + const int type = lua_type(L, -1); if (type != LUA_TBOOLEAN) return luaL_error(L, "Expected argument of type 'bool'"); - bool b = lua_toboolean(L, -1) != 0; - OsEng.renderEngine().toggleInfoText(b); - return 0; + bool b = lua_toboolean(L, -1) != 0; + OsEng.renderEngine().toggleInfoText(b); + return 0; } /** @@ -93,13 +93,13 @@ int showRenderInformation(lua_State* L) { * Toggle the visualization of the ABuffer */ int setPerformanceMeasurement(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); - bool b = lua_toboolean(L, -1) != 0; - OsEng.renderEngine().setPerformanceMeasurements(b); - return 0; + bool b = lua_toboolean(L, -1) != 0; + OsEng.renderEngine().setPerformanceMeasurements(b); + return 0; } /** @@ -108,14 +108,14 @@ int setPerformanceMeasurement(lua_State* L) { * start a global fadein over (float) seconds */ int fadeIn(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); - double t = luaL_checknumber(L, -1); - - OsEng.renderEngine().startFading(1, static_cast(t)); - return 0; + double t = luaL_checknumber(L, -1); + + OsEng.renderEngine().startFading(1, static_cast(t)); + return 0; } /** * \ingroup LuaScripts @@ -123,14 +123,14 @@ int fadeIn(lua_State* L) { * start a global fadeout over (float) seconds */ int fadeOut(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); - double t = luaL_checknumber(L, -1); + double t = luaL_checknumber(L, -1); - OsEng.renderEngine().startFading(-1, static_cast(t)); - return 0; + OsEng.renderEngine().startFading(-1, static_cast(t)); + return 0; } } // namespace luascriptfunctions diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index ed07ef8408..a14bdb0b3c 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -38,34 +38,34 @@ int property_setValue(lua_State* L) { using ghoul::lua::errorLocation; using ghoul::lua::luaTypeToString; - int nArguments = lua_gettop(L); + int nArguments = lua_gettop(L); SCRIPT_CHECK_ARGUMENTS(L, 2, nArguments); - std::string uri = luaL_checkstring(L, -2); - const int type = lua_type(L, -1); + std::string uri = luaL_checkstring(L, -2); + const int type = lua_type(L, -1); - openspace::properties::Property* prop = property(uri); - if (!prop) { + openspace::properties::Property* prop = property(uri); + if (!prop) { LERROR(errorLocation(L) << "Property with URI '" << uri << "' was not found"); return 0; } - if (type != prop->typeLua()) { + if (type != prop->typeLua()) { LERROR(errorLocation(L) << "Property '" << uri << "' does not accept input of type '" << luaTypeToString(type) << "'. Requested type: '" << luaTypeToString(prop->typeLua()) << "'"); return 0; } else{ - prop->setLuaValue(L); + prop->setLuaValue(L); //ensure properties are synced over parallel connection std::string value; prop->getStringValue(value); OsEng.parallelConnection().scriptMessage(prop->fullyQualifiedIdentifier(), value); } - return 0; + return 0; } /** @@ -78,19 +78,19 @@ int property_getValue(lua_State* L) { static const std::string _loggerCat = "property_getValue"; using ghoul::lua::errorLocation; - int nArguments = lua_gettop(L); + int nArguments = lua_gettop(L); SCRIPT_CHECK_ARGUMENTS(L, 1, nArguments); - std::string uri = luaL_checkstring(L, -1); + std::string uri = luaL_checkstring(L, -1); - openspace::properties::Property* prop = property(uri); - if (!prop) { + openspace::properties::Property* prop = property(uri); + if (!prop) { LERROR(errorLocation(L) << "Property with URL '" << uri << "' was not found"); return 0; } - else - prop->getLuaValue(L); - return 1; + else + prop->getLuaValue(L); + return 1; } /** @@ -102,14 +102,14 @@ int property_getValue(lua_State* L) { int loadScene(lua_State* L) { static const std::string _loggerCat = "loadScene"; - int nArguments = lua_gettop(L); + int nArguments = lua_gettop(L); SCRIPT_CHECK_ARGUMENTS(L, 1, nArguments); - std::string sceneFile = luaL_checkstring(L, -1); + std::string sceneFile = luaL_checkstring(L, -1); - OsEng.renderEngine().scene()->scheduleLoadSceneFile(sceneFile); + OsEng.renderEngine().scene()->scheduleLoadSceneFile(sceneFile); - return 0; + return 0; } } // namespace luascriptfunctions diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index 38ce5a1b16..8b08660d4b 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -26,131 +26,131 @@ namespace openspace { namespace luascriptfunctions { - int printInternal(ghoul::logging::LogManager::LogLevel level, lua_State* L) { - using ghoul::lua::luaTypeToString; - const std::string _loggerCat = "print"; + int printInternal(ghoul::logging::LogManager::LogLevel level, lua_State* L) { + using ghoul::lua::luaTypeToString; + const std::string _loggerCat = "print"; - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %i arguments, got %i", 1, nArguments); - const int type = lua_type(L, -1); - switch (type) { - case LUA_TNONE: - case LUA_TLIGHTUSERDATA: - case LUA_TTABLE: - case LUA_TFUNCTION: - case LUA_TUSERDATA: - case LUA_TTHREAD: - LOG(level, "Function parameter was of type '" << - luaTypeToString(type) << "'"); - case LUA_TNIL: - break; - case LUA_TBOOLEAN: - LOG(level, lua_toboolean(L, -1)); - break; - case LUA_TNUMBER: - LOG(level, lua_tonumber(L, -1)); - break; - case LUA_TSTRING: - LOG(level, lua_tostring(L, -1)); - break; - } - return 0; - } + const int type = lua_type(L, -1); + switch (type) { + case LUA_TNONE: + case LUA_TLIGHTUSERDATA: + case LUA_TTABLE: + case LUA_TFUNCTION: + case LUA_TUSERDATA: + case LUA_TTHREAD: + LOG(level, "Function parameter was of type '" << + luaTypeToString(type) << "'"); + case LUA_TNIL: + break; + case LUA_TBOOLEAN: + LOG(level, lua_toboolean(L, -1)); + break; + case LUA_TNUMBER: + LOG(level, lua_tonumber(L, -1)); + break; + case LUA_TSTRING: + LOG(level, lua_tostring(L, -1)); + break; + } + return 0; + } - /** - * \ingroup LuaScripts - * printDebug(*): - * Logs the passed value to the installed LogManager with a LogLevel of 'Debug'. - * For Boolean, numbers, and strings, the internal values are printed, for all other - * types, the type is printed instead - */ - int printDebug(lua_State* L) { - return printInternal(ghoul::logging::LogManager::LogLevel::Debug, L); - } + /** + * \ingroup LuaScripts + * printDebug(*): + * Logs the passed value to the installed LogManager with a LogLevel of 'Debug'. + * For Boolean, numbers, and strings, the internal values are printed, for all other + * types, the type is printed instead + */ + int printDebug(lua_State* L) { + return printInternal(ghoul::logging::LogManager::LogLevel::Debug, L); + } - /** - * \ingroup LuaScripts - * printInfo(*): - * Logs the passed value to the installed LogManager with a LogLevel of 'Info'. - * For Boolean, numbers, and strings, the internal values are printed, for all other - * types, the type is printed instead - */ - int printInfo(lua_State* L) { - return printInternal(ghoul::logging::LogManager::LogLevel::Info, L); - } + /** + * \ingroup LuaScripts + * printInfo(*): + * Logs the passed value to the installed LogManager with a LogLevel of 'Info'. + * For Boolean, numbers, and strings, the internal values are printed, for all other + * types, the type is printed instead + */ + int printInfo(lua_State* L) { + return printInternal(ghoul::logging::LogManager::LogLevel::Info, L); + } - /** - * \ingroup LuaScripts - * printWarning(*): - * Logs the passed value to the installed LogManager with a LogLevel of 'Warning'. - * For Boolean, numbers, and strings, the internal values are printed, for all other - * types, the type is printed instead - */ - int printWarning(lua_State* L) { - return printInternal(ghoul::logging::LogManager::LogLevel::Warning, L); - } + /** + * \ingroup LuaScripts + * printWarning(*): + * Logs the passed value to the installed LogManager with a LogLevel of 'Warning'. + * For Boolean, numbers, and strings, the internal values are printed, for all other + * types, the type is printed instead + */ + int printWarning(lua_State* L) { + return printInternal(ghoul::logging::LogManager::LogLevel::Warning, L); + } - /** - * \ingroup LuaScripts - * printError(*): - * Logs the passed value to the installed LogManager with a LogLevel of 'Error'. - * For Boolean, numbers, and strings, the internal values are printed, for all other - * types, the type is printed instead - */ - int printError(lua_State* L) { - return printInternal(ghoul::logging::LogManager::LogLevel::Error, L); - } + /** + * \ingroup LuaScripts + * printError(*): + * Logs the passed value to the installed LogManager with a LogLevel of 'Error'. + * For Boolean, numbers, and strings, the internal values are printed, for all other + * types, the type is printed instead + */ + int printError(lua_State* L) { + return printInternal(ghoul::logging::LogManager::LogLevel::Error, L); + } - /** - * \ingroup LuaScripts - * printFatal(*): - * Logs the passed value to the installed LogManager with a LogLevel of 'Fatal'. - * For Boolean, numbers, and strings, the internal values are printed, for all other - * types, the type is printed instead - */ - int printFatal(lua_State* L) { - return printInternal(ghoul::logging::LogManager::LogLevel::Fatal, L); - } + /** + * \ingroup LuaScripts + * printFatal(*): + * Logs the passed value to the installed LogManager with a LogLevel of 'Fatal'. + * For Boolean, numbers, and strings, the internal values are printed, for all other + * types, the type is printed instead + */ + int printFatal(lua_State* L) { + return printInternal(ghoul::logging::LogManager::LogLevel::Fatal, L); + } - /** - * \ingroup LuaScripts - * absPath(string): - * Passes the argument to FileSystem::absolutePath, which resolves occuring path - * tokens and returns the absolute path. - */ - int absolutePath(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 1) - return luaL_error(L, "Expected %d arguments, got %d", 1, nArguments); + /** + * \ingroup LuaScripts + * absPath(string): + * Passes the argument to FileSystem::absolutePath, which resolves occuring path + * tokens and returns the absolute path. + */ + int absolutePath(lua_State* L) { + int nArguments = lua_gettop(L); + if (nArguments != 1) + return luaL_error(L, "Expected %d arguments, got %d", 1, nArguments); - std::string path = luaL_checkstring(L, -1); - path = absPath(path); - lua_pushstring(L, path.c_str()); - return 1; - } + std::string path = luaL_checkstring(L, -1); + path = absPath(path); + lua_pushstring(L, path.c_str()); + return 1; + } - /** - * \ingroup LuaScripts - * setPathToken(string, string): - * Registers the path token provided by the first argument to the path in the second - * argument. If the path token already exists, it will be silently overridden. - */ - int setPathToken(lua_State* L) { - int nArguments = lua_gettop(L); - if (nArguments != 2) - return luaL_error(L, "Expected %i arguments, got %i", 2, nArguments); + /** + * \ingroup LuaScripts + * setPathToken(string, string): + * Registers the path token provided by the first argument to the path in the second + * argument. If the path token already exists, it will be silently overridden. + */ + int setPathToken(lua_State* L) { + int nArguments = lua_gettop(L); + if (nArguments != 2) + return luaL_error(L, "Expected %i arguments, got %i", 2, nArguments); - std::string pathToken = luaL_checkstring(L, -1); - std::string path = luaL_checkstring(L, -2); - FileSys.registerPathToken( + std::string pathToken = luaL_checkstring(L, -1); + std::string path = luaL_checkstring(L, -2); + FileSys.registerPathToken( pathToken, path, ghoul::filesystem::FileSystem::Override::Yes ); - return 0; - } + return 0; + } } // namespace luascriptfunctions diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index 1b77cd851a..1808b34d40 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -32,24 +32,24 @@ namespace luascriptfunctions { * Sets the delta time by calling the Time::setDeltaTime method */ int time_setDeltaTime(lua_State* L) { - const bool isFunction = (lua_isfunction(L, -1) != 0); - if (isFunction) { - // If the top of the stack is a function, it is ourself - const char* msg = lua_pushfstring(L, "method called without argument"); - return luaL_error(L, "bad argument (%s)", msg); - } + const bool isFunction = (lua_isfunction(L, -1) != 0); + if (isFunction) { + // If the top of the stack is a function, it is ourself + const char* msg = lua_pushfstring(L, "method called without argument"); + return luaL_error(L, "bad argument (%s)", msg); + } - const bool isNumber = (lua_isnumber(L, -1) != 0); - if (isNumber) { - double value = lua_tonumber(L, -1); - openspace::Time::ref().setDeltaTime(value); - return 0; - } - else { - const char* msg = lua_pushfstring(L, "%s expected, got %s", - lua_typename(L, LUA_TNUMBER), luaL_typename(L, -1)); - return luaL_error(L, "bad argument #%d (%s)", 1, msg); - } + const bool isNumber = (lua_isnumber(L, -1) != 0); + if (isNumber) { + double value = lua_tonumber(L, -1); + openspace::Time::ref().setDeltaTime(value); + return 0; + } + else { + const char* msg = lua_pushfstring(L, "%s expected, got %s", + lua_typename(L, LUA_TNUMBER), luaL_typename(L, -1)); + return luaL_error(L, "bad argument #%d (%s)", 1, msg); + } } @@ -59,8 +59,8 @@ int time_setDeltaTime(lua_State* L) { * Returns the delta time by calling the Time::deltaTime method */ int time_deltaTime(lua_State* L) { - lua_pushnumber(L, openspace::Time::ref().deltaTime()); - return 1; + lua_pushnumber(L, openspace::Time::ref().deltaTime()); + return 1; } /** @@ -99,32 +99,32 @@ int time_setPause(lua_State* L) { * is called */ int time_setTime(lua_State* L) { - const bool isFunction = (lua_isfunction(L, -1) != 0); - if (isFunction) { - // If the top of the stack is a function, it is ourself - const char* msg = lua_pushfstring(L, "method called without argument"); - return luaL_error(L, "bad argument (%s)", 1, msg); - } + const bool isFunction = (lua_isfunction(L, -1) != 0); + if (isFunction) { + // If the top of the stack is a function, it is ourself + const char* msg = lua_pushfstring(L, "method called without argument"); + return luaL_error(L, "bad argument (%s)", 1, msg); + } - const bool isNumber = (lua_isnumber(L, -1) != 0); - const bool isString = (lua_isstring(L, -1) != 0); - if (!isNumber && !isString) { - const char* msg = lua_pushfstring(L, "%s or %s expected, got %s", - lua_typename(L, LUA_TNUMBER), - lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); - return luaL_error(L, "bad argument #%d (%s)", 1, msg); - } - if (isNumber) { - double value = lua_tonumber(L, -1); - openspace::Time::ref().setTime(value); - return 0; - } - if (isString) { - const char* time = lua_tostring(L, -1); - openspace::Time::ref().setTime(time); - return 0; - } - return 0; + const bool isNumber = (lua_isnumber(L, -1) != 0); + const bool isString = (lua_isstring(L, -1) != 0); + if (!isNumber && !isString) { + const char* msg = lua_pushfstring(L, "%s or %s expected, got %s", + lua_typename(L, LUA_TNUMBER), + lua_typename(L, LUA_TSTRING), luaL_typename(L, -1)); + return luaL_error(L, "bad argument #%d (%s)", 1, msg); + } + if (isNumber) { + double value = lua_tonumber(L, -1); + openspace::Time::ref().setTime(value); + return 0; + } + if (isString) { + const char* time = lua_tostring(L, -1); + openspace::Time::ref().setTime(time); + return 0; + } + return 0; } /** @@ -134,8 +134,8 @@ int time_setTime(lua_State* L) { * It is returned by calling the Time::currentTime method. */ int time_currentTime(lua_State* L) { - lua_pushnumber(L, openspace::Time::ref().currentTime()); - return 1; + lua_pushnumber(L, openspace::Time::ref().currentTime()); + return 1; } /** @@ -145,8 +145,8 @@ int time_currentTime(lua_State* L) { * timezone by calling the Time::currentTimeUTC method */ int time_currentTimeUTC(lua_State* L) { - lua_pushstring(L, openspace::Time::ref().currentTimeUTC().c_str()); - return 1; + lua_pushstring(L, openspace::Time::ref().currentTimeUTC().c_str()); + return 1; } } // namespace luascriptfunctions