Save and Load camera position

This commit is contained in:
Sebastian Piwell
2016-06-28 15:03:00 -04:00
parent a9ac7ab65b
commit d2fccb6d1b
8 changed files with 108 additions and 11 deletions
+2
View File
@@ -0,0 +1,2 @@
-6.23538e+09 -7.4768e+10 1.28478e+11
-0.0115185 0.6478 0.00979661 0.761661
+72
View File
@@ -0,0 +1,72 @@
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
--openspace.time.setTime(openspace.time.currentWallTime())
openspace.time.setTime('2015-03-15T11:00:00.00')
openspace.time.setDeltaTime(0)
dofile(openspace.absPath('${SCRIPTS}/bind_keys_iswa.lua'))
end
function postInitialization()
--[[
The scripts in this function are executed after all objects in the scene have been
created and initialized, but before the first render call. This is the place to set
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
openspace.setPropertyValue("Sun.renderable.enabled", true)
openspace.setPropertyValue("SunGlare.renderable.enabled", false)
openspace.setPropertyValue("SunMarker.renderable.enabled", false)
openspace.setPropertyValue("EarthMarker.renderable.enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.segments", 50)
openspace.printInfo("Done setting default values")
if openspace.modules.isLoaded("ISWA") then
openspace.restoreCameraPosition('${OPENSPACE_DATA}/iswa/magnetosphere.pos');
openspace.iswa.addCdfFiles("${OPENSPACE_DATA}/iswa/cdflist.json");
--openspace.iswa.addCygnet(7);
--openspace.iswa.addCygnet(-4,"Data","Gm");
--openspace.iswa.addCygnet(-5,"Data","Gm");
--openspace.iswa.addCygnet(-6,"Data","Gm");
--openspace.iswa.addCygnet(-7,"Data","Gm");
--openspace.iswa.addCygnet(-8,"Data","Gm");
--openspace.iswa.addCygnet(-9,"Data","Gm");
end
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "Earth",
},
Modules = {
"sun",
--"mercury",
--"venus",
"earth",
--"mars",
--"jupiter",
--"saturn",
--"uranus",
--"neptune",
"stars",
--"stars-denver",
"milkyway",
--"milkyway-eso",
"constellationbounds",
}
}