Fix linking error when OpenSpace is compiled without the globebrowsing module

This commit is contained in:
Alexander Bock
2016-08-29 10:45:59 +02:00
parent 04f206da76
commit 193e2bdc64
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -35,8 +35,10 @@
#include <glm/gtx/quaternion.hpp>
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
#include <modules/globebrowsing/globes/renderableglobe.h>
#include <modules/globebrowsing/chunk/chunkedlodglobe.h>
#endif
namespace {
@@ -468,6 +470,7 @@ GlobeBrowsingInteractionMode::~GlobeBrowsingInteractionMode() {
void GlobeBrowsingInteractionMode::setFocusNode(SceneGraphNode* focusNode) {
InteractionMode::setFocusNode(focusNode);
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
Renderable* baseRenderable = _focusNode->renderable();
if (RenderableGlobe* globe = dynamic_cast<RenderableGlobe*>(baseRenderable)) {
_globe = globe;
@@ -476,13 +479,14 @@ void GlobeBrowsingInteractionMode::setFocusNode(SceneGraphNode* focusNode) {
LWARNING("Focus node is not a renderable globe. GlobeBrowsingInteraction is not possible");
_globe = nullptr;
}
#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
}
void GlobeBrowsingInteractionMode::updateCameraStateFromMouseStates(Camera& camera) {
// Update synched data
_mouseStates->postSynchronizationPreDraw();
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
using namespace glm;
if (_focusNode && _globe) {
// Declare variables to use in interaction calculations
@@ -631,6 +635,7 @@ void GlobeBrowsingInteractionMode::updateCameraStateFromMouseStates(Camera& came
camera.setPositionVec3(camPos);
camera.setRotation(globalCameraRotation * localCameraRotation);
}
#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
}
} // namespace interaction