Create separate key bindings for rosetta mission

Prolong rosetta trail
This commit is contained in:
Alexander Bock
2016-05-18 21:37:27 +02:00
parent ecf1862eb3
commit dba650c80d
4 changed files with 55 additions and 6 deletions

View File

@@ -6,9 +6,9 @@ function preInitialization()
critical objects.
]]--
-- openspace.time.setTime("2014 AUG 21 18:00:00")
openspace.time.setTime("2015 SEP 10 19:39:00")
dofile(openspace.absPath('${SCRIPTS}/bind_keys.lua'))
openspace.time.setTime("2014 AUG 21 18:00:00")
-- openspace.time.setTime("2015 SEP 10 19:39:00")
dofile(openspace.absPath('${SCRIPTS}/bind_keys_rosetta.lua'))
end
function postInitialization()

View File

@@ -103,7 +103,7 @@ return {
Color = "textures/glare.png"
},
StartTime = "2014 AUG 01 12:00:00",
EndTime = "2015 MAY 26 12:00:00"
EndTime = "2016 MAY 26 12:00:00"
},
GuiName = "RosettaCometTrail"
},

View File

@@ -198,6 +198,7 @@ bool RenderableModelProjection::initialize() {
"${MODULE_NEWHORIZONS}/shaders/modelShader_vs.glsl",
"${MODULE_NEWHORIZONS}/shaders/modelShader_fs.glsl");
if (!_programObject)
return false;
}
@@ -207,6 +208,7 @@ bool RenderableModelProjection::initialize() {
_fboProgramObject = ghoul::opengl::ProgramObject::Build("ProjectionPass",
"${MODULE_NEWHORIZONS}/shaders/projectionPass_vs.glsl",
"${MODULE_NEWHORIZONS}/shaders/projectionPass_fs.glsl");
_fboProgramObject->setIgnoreUniformLocationError(ghoul::opengl::ProgramObject::IgnoreError::Yes);
if (!_fboProgramObject)
return false;
}
@@ -408,7 +410,8 @@ void RenderableModelProjection::update(const UpdateData& data) {
}
void RenderableModelProjection::imageProjectGPU() {
glDisable(GL_DEPTH_TEST);
// keep handle to the current bound FBO
GLint defaultFBO;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO);
@@ -446,12 +449,13 @@ void RenderableModelProjection::imageProjectGPU() {
glBindVertexArray(0);
_fboProgramObject->deactivate();
glDisable(GL_BLEND);
//glDisable(GL_BLEND);
//bind back to default
glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO);
glViewport(m_viewport[0], m_viewport[1],
m_viewport[2], m_viewport[3]);
glEnable(GL_DEPTH_TEST);
}
void RenderableModelProjection::attitudeParameters(double time) {

View File

@@ -0,0 +1,45 @@
--[[ OpenSpace keybinding script ]]--
-- This script sets the default keybindings and is executed at startup
openspace.clearKeys()
openspace.bindKey("F1", "openspace.gui.toggle()")
openspace.bindKey("F2", "openspace.setPerformanceMeasurement(true)")
openspace.bindKey("F3", "openspace.setPerformanceMeasurement(false)")
openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun'); openspace.printInfo('Changing Viewpoint to Sun-in-center');");
openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', '67P'); openspace.printInfo('Changing Viewpoint to 67P-in-center');");
openspace.bindKey("PRINT_SCREEN", "openspace.takeScreenshot()")
openspace.bindKey("SPACE", "openspace.time.togglePause()")
-- Bookmarks for the New Horizons encounter
openspace.bindKey("1", "openspace.time.setDeltaTime(1)")
openspace.bindKey("2", "openspace.time.setDeltaTime(5)")
openspace.bindKey("3", "openspace.time.setDeltaTime(10)")
openspace.bindKey("4", "openspace.time.setDeltaTime(20)")
openspace.bindKey("5", "openspace.time.setDeltaTime(40)")
openspace.bindKey("6", "openspace.time.setDeltaTime(90)")
openspace.bindKey("7", "openspace.time.setDeltaTime(360)")
openspace.bindKey("8", "openspace.time.setDeltaTime(720)")
openspace.bindKey("9", "openspace.time.setDeltaTime(2880)")
openspace.bindKey("0", "openspace.time.setDeltaTime(14400)")
openspace.bindKey("SHIFT+1", "openspace.time.setDeltaTime(28800)")
openspace.bindKey("SHIFT+2", "openspace.time.setDeltaTime(57600)")
openspace.bindKey("SHIFT+3", "openspace.time.setDeltaTime(115200)")
openspace.bindKey("SHIFT+4", "openspace.time.setDeltaTime(230400)")
openspace.bindKey("SHIFT+5", "openspace.time.setDeltaTime(460800)")
openspace.bindKey("i", "local b = openspace.getPropertyValue('ImagePlaneRosetta.renderable.enabled'); openspace.setPropertyValue('ImagePlaneRosetta.renderable.enabled', not b)")
openspace.bindKey("F8", "openspace.setPropertyValue('PlutoProjection.renderable.clearAllProjections', true); openspace.setPropertyValue('Charon.renderable.clearAllProjections', true);")
openspace.bindKey("a", "openspace.setPropertyValue('Interaction.origin', '67P')")
openspace.bindKey("s", "openspace.setPropertyValue('Interaction.origin', 'Rosetta')")
openspace.bindKey("q", "local b = openspace.getPropertyValue('SunMarker.renderable.enabled'); openspace.setPropertyValue('SunMarker.renderable.enabled', not b)")
openspace.bindKey("e", "local b = openspace.getPropertyValue('EarthMarker.renderable.enabled'); openspace.setPropertyValue('EarthMarker.renderable.enabled', not b)")
openspace.bindKey("c", "openspace.parallel.setAddress('130.236.142.51');openspace.parallel.setPassword('newhorizons-20150714');openspace.parallel.connect();")
openspace.bindKey("COMMA", "openspace.setRenderer('Framebuffer');")
openspace.bindKey("PERIOD", "openspace.setRenderer('ABuffer');")