Merge with develop

This commit is contained in:
Sebastian Piwell
2016-07-05 11:49:23 -04:00
10 changed files with 33 additions and 18 deletions

View File

@@ -1 +1 @@
${OPENSPACE_DATA}/iswa/transferfunctions/images/colormap_hot.png
${OPENSPACE_DATA}/iswa/transferfunctions/images/colormap_hot.jpg

View File

@@ -105,11 +105,8 @@ void ScreenSpaceImage::render() {
}
void ScreenSpaceImage::update() {
if (!_downloadImage) {
if (_futureImage.valid() && DownloadManager::futureReady(_futureImage))
_textureDirty = true;
}
if (_textureDirty) {
bool download = _downloadImage ? (_futureImage.valid() && DownloadManager::futureReady(_futureImage)) : true;
if (download) {
loadTexture();
_textureDirty = false;
}

View File

@@ -30,6 +30,7 @@
#include <openspace/properties/triggerproperty.h>
#include <modules/iswa/util/dataprocessor.h>
#include <modules/iswa/util/iswamanager.h>
// #include <modules/iswa/rendering/iswacygnet.h>
namespace openspace{
@@ -48,6 +49,14 @@ public:
std::shared_ptr<DataProcessor> dataProcessor();
std::shared_ptr<ghoul::Event<ghoul::Dictionary> > groupEvent();
void addCygnet(IswaCygnet* cygnet){
_cygnets.push_back(cygnet);
}
std::vector<IswaCygnet*> cygnets(){
return _cygnets;
}
protected:
void registerProperties();
void unregisterProperties();
@@ -59,6 +68,8 @@ protected:
std::shared_ptr<ghoul::Event<ghoul::Dictionary> > _groupEvent;
std::shared_ptr<DataProcessor> _dataProcessor;
IswaManager::CygnetType _type;
std::vector<IswaCygnet*> _cygnets;
};
} //namespace openspace

View File

@@ -246,6 +246,7 @@ bool IswaCygnet::createShader(){
void IswaCygnet::initializeGroup(){
_group = IswaManager::ref().iswaGroup(_data->groupName);
_group->addCygnet(this);
getGroupPropertyValues();
//Subscribe to enable and delete property

View File

@@ -153,7 +153,7 @@ void addScreenSpaceRenderable(std::string texturePath) {
return;
}
std::string luaTable =
"{Type = 'ScreenSpaceImage', TexturePath = '+" + absPath(texturePath) + " ' }";
"{Type = 'ScreenSpaceImage', TexturePath = '" + absPath(texturePath) + "' }";
std::string script = "openspace.registerScreenSpaceRenderable(" + luaTable + ");";
OsEng.scriptEngine().queueScript(script);
}

View File

@@ -9,11 +9,11 @@ return {
-- of all entities that will be visible during an instance of OpenSpace
-- Scene = "${SCENE}/default-moon.scene",
-- Scene = "${SCENE}/default.scene",
Scene = "${SCENE}/globebrowsing.scene",
-- Scene = "${SCENE}/globebrowsing.scene",
-- Scene = "${SCENE}/rosetta.scene",
-- Scene = "${SCENE}/dawn.scene",
-- Scene = "${SCENE}/newhorizons.scene",
-- Scene = "${SCENE}/iswa.scene",
Scene = "${SCENE}/iswa.scene",
Paths = {
SGCT = "${BASE_PATH}/config/sgct",

View File

@@ -21,7 +21,7 @@ openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSyste
openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Jupiter'); openspace.printInfo('Changing Viewpoint to Jupiter');");
openspace.bindKey("F7", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Pluto'); openspace.printInfo('Changing Viewpoint to Pluto');");
openspace.bindKey("F8", "openspace.setPropertyValue('PlutoProjection.renderable.clearAllProjections', true); openspace.setPropertyValue('Charon.renderable.clearAllProjections', true);")
openspace.bindKey("F8", "openspace.setPropertyValue('PlutoProjection.renderable.ProjectionComponent.clearAllProjections', true); openspace.setPropertyValue('Charon.renderable.ProjectionComponent.clearAllProjections', true);")
-- Quickfix backjumps in pluto sequence
openspace.bindKey("F9", "openspace.time.setTime('2015-07-14T09:00:00.00'); openspace.setPropertyValue('PlutoProjection.renderable.clearAllProjections', true); openspace.setPropertyValue('Charon.renderable.clearAllProjections', true);")

View File

@@ -17,7 +17,7 @@ openspace.bindKey("s", "openspace.setPropertyValue('Interaction.origin', 'Rosett
-- openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun'); openspace.printInfo('Changing Viewpoint to Sun');");
openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', '67P'); openspace.printInfo('Changing Viewpoint to 67P');");
openspace.bindKey("F8", "openspace.setPropertyValue('67P.renderable.clearAllProjections', true);");
openspace.bindKey("F8", "openspace.setPropertyValue('67P.renderable.ProjectionComponent.clearAllProjections', true);");
openspace.bindKey("i", helper.renderable.toggle('ImagePlaneRosetta'))
openspace.bindKey("q", helper.renderable.toggle('SunMarker'))

View File

@@ -1122,7 +1122,8 @@ void RenderEngine::setDisableRenderingOnMaster(bool enabled) {
_disableMasterRendering = enabled;
}
void RenderEngine::registerScreenSpaceRenderable(std::shared_ptr<ScreenSpaceRenderable> s){
void RenderEngine::registerScreenSpaceRenderable(std::shared_ptr<ScreenSpaceRenderable> s)
{
s->initialize();
_screenSpaceRenderables.push_back(s);
}

View File

@@ -644,8 +644,7 @@ void ScriptEngine::deserialize(SyncBuffer* syncBuffer){
}
}
void ScriptEngine::postSynchronizationPreDraw(){
void ScriptEngine::postSynchronizationPreDraw() {
std::vector<std::string> scripts;
_mutex.lock();
@@ -653,14 +652,20 @@ void ScriptEngine::postSynchronizationPreDraw(){
_receivedScripts.clear();
_mutex.unlock();
while (!scripts.empty()){
runScript(scripts.back());
scripts.pop_back();
while (!scripts.empty()) {
try {
const std::string& script = scripts.back();
scripts.pop_back();
runScript(script);
}
catch (const ghoul::RuntimeError& e) {
LERRORC(e.component, e.message);
}
}
}
void ScriptEngine::preSynchronization(){
void ScriptEngine::preSynchronization() {
_mutex.lock();