mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Untabify more files
This commit is contained in:
@@ -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},
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
--]]
|
||||
--]]
|
||||
}
|
||||
@@ -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 },
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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},
|
||||
|
||||
@@ -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},
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
},
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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<float>(t));
|
||||
return 0;
|
||||
double t = luaL_checknumber(L, -1);
|
||||
|
||||
OsEng.renderEngine().startFading(1, static_cast<float>(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<float>(t));
|
||||
return 0;
|
||||
OsEng.renderEngine().startFading(-1, static_cast<float>(t));
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace luascriptfunctions
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user