diff --git a/ext/ghoul b/ext/ghoul index 9b822d0133..f519946a02 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 9b822d01339fcc216fb35582977b91ac85ff099a +Subproject commit f519946a026e8bf538d8caa5d258fe5b623366d9 diff --git a/include/openspace/interaction/interactionhandler.h b/include/openspace/interaction/interactionhandler.h index ba3d8a022a..72e73d3566 100644 --- a/include/openspace/interaction/interactionhandler.h +++ b/include/openspace/interaction/interactionhandler.h @@ -34,7 +34,10 @@ #include #include + +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED #include +#endif #include @@ -273,6 +276,7 @@ protected: glm::dquat _globalCameraRotation; }; +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED class GlobeBrowsingInteractionMode : public OrbitalInteractionMode { public: @@ -288,6 +292,7 @@ private: void updateCameraStateFromMouseStates(); RenderableGlobe* _globe; }; +#endif class InteractionHandler : public properties::PropertyOwner @@ -302,7 +307,9 @@ public: // Interaction mode setters void setInteractionModeToOrbital(); +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED void setInteractionModeToGlobeBrowsing(); +#endif void resetKeyBindings(); @@ -345,7 +352,10 @@ private: std::shared_ptr _currentInteractionMode; std::shared_ptr _orbitalInteractionMode; + +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED std::shared_ptr _globebrowsingInteractionMode; +#endif // Properties properties::StringProperty _origin; diff --git a/modules/galaxy/include.cmake b/modules/galaxy/include.cmake index 163c5a64bf..1fbd4a3ae5 100644 --- a/modules/galaxy/include.cmake +++ b/modules/galaxy/include.cmake @@ -1,4 +1,3 @@ -set (DEFAULT_MODULE ON) set (OPENSPACE_DEPENDENCIES volume ) \ No newline at end of file diff --git a/modules/globebrowsing/chunk/chunk.cpp b/modules/globebrowsing/chunk/chunk.cpp index 0319abd804..5fc7cbced6 100644 --- a/modules/globebrowsing/chunk/chunk.cpp +++ b/modules/globebrowsing/chunk/chunk.cpp @@ -73,7 +73,7 @@ namespace openspace { _owner = newOwner; } - Chunk::State Chunk::update(const RenderData& data) { + Chunk::Status Chunk::update(const RenderData& data) { Camera* savedCamera = _owner->getSavedCamera(); const Camera& camRef = savedCamera != nullptr ? *savedCamera : data.camera; RenderData myRenderData = { camRef, data.position, data.doPerformanceMeasurement }; @@ -82,14 +82,14 @@ namespace openspace { _isVisible = true; if (_owner->testIfCullable(*this, myRenderData)) { _isVisible = false; - return State::WANT_MERGE; + return Status::WANT_MERGE; } int desiredLevel = _owner->getDesiredLevel(*this, myRenderData); - if (desiredLevel < _index.level) return State::WANT_MERGE; - else if (_index.level < desiredLevel) return State::WANT_SPLIT; - else return State::DO_NOTHING; + if (desiredLevel < _index.level) return Status::WANT_MERGE; + else if (_index.level < desiredLevel) return Status::WANT_SPLIT; + else return Status::DO_NOTHING; } Chunk::BoundingHeights Chunk::getBoundingHeights() const { @@ -104,7 +104,7 @@ namespace openspace { auto heightMapProviders = tileProvidermanager->getActivatedLayerCategory(LayeredTextures::HeightMaps); if (heightMapProviders.size() > 0) { TileAndTransform tileAndTransform = TileSelector::getHighestResolutionTile(heightMapProviders[0].get(), _index); - if (tileAndTransform.tile.status == Tile::State::OK) { + if (tileAndTransform.tile.status == Tile::Status::OK) { std::shared_ptr preprocessData = tileAndTransform.tile.preprocessData; if ((preprocessData != nullptr) && preprocessData->maxValues.size() > 0) { boundingHeights.max = preprocessData->maxValues[0]; diff --git a/modules/globebrowsing/chunk/chunk.h b/modules/globebrowsing/chunk/chunk.h index 21c5500116..5752e02011 100644 --- a/modules/globebrowsing/chunk/chunk.h +++ b/modules/globebrowsing/chunk/chunk.h @@ -50,7 +50,7 @@ namespace openspace { bool available; }; - enum class State { + enum class Status { DO_NOTHING, WANT_MERGE, WANT_SPLIT, @@ -59,7 +59,7 @@ namespace openspace { Chunk(ChunkedLodGlobe* owner, const ChunkIndex& chunkIndex, bool initVisible = true); /// Updates chunk internally and returns a desired level - State update(const RenderData& data); + Status update(const RenderData& data); void render(const RenderData& data) const; diff --git a/modules/globebrowsing/chunk/chunkindex.h b/modules/globebrowsing/chunk/chunkindex.h index b451fe1d65..e870081891 100644 --- a/modules/globebrowsing/chunk/chunkindex.h +++ b/modules/globebrowsing/chunk/chunkindex.h @@ -27,7 +27,7 @@ #include #include -#include + namespace openspace { diff --git a/modules/globebrowsing/chunk/chunklevelevaluator.cpp b/modules/globebrowsing/chunk/chunklevelevaluator.cpp index 498cbfe011..9663c7bf7c 100644 --- a/modules/globebrowsing/chunk/chunklevelevaluator.cpp +++ b/modules/globebrowsing/chunk/chunklevelevaluator.cpp @@ -154,8 +154,8 @@ namespace openspace { // simply check the first heigtmap if (heightMapProviders.size() > 0) { - Tile::State heightTileStatus = heightMapProviders[0]->getTileStatus(chunk.index()); - if (heightTileStatus == Tile::State::IOError || heightTileStatus == Tile::State::OutOfRange) { + Tile::Status heightTileStatus = heightMapProviders[0]->getTileStatus(chunk.index()); + if (heightTileStatus == Tile::Status::IOError || heightTileStatus == Tile::Status::OutOfRange) { return currLevel-1; } diff --git a/modules/globebrowsing/chunk/chunknode.cpp b/modules/globebrowsing/chunk/chunknode.cpp index a6c9a9ca4c..431c52793e 100644 --- a/modules/globebrowsing/chunk/chunknode.cpp +++ b/modules/globebrowsing/chunk/chunknode.cpp @@ -73,11 +73,11 @@ bool ChunkNode::updateChunkTree(const RenderData& data) { //LDEBUG("x: " << patch.x << " y: " << patch.y << " level: " << patch.level << " lat: " << center.lat << " lon: " << center.lon); if (isLeaf()) { - Chunk::State status = _chunk.update(data); - if (status == Chunk::State::WANT_SPLIT) { + Chunk::Status status = _chunk.update(data); + if (status == Chunk::Status::WANT_SPLIT) { split(); } - return status == Chunk::State::WANT_MERGE; + return status == Chunk::Status::WANT_MERGE; } else { char requestedMergeMask = 0; @@ -88,7 +88,7 @@ bool ChunkNode::updateChunkTree(const RenderData& data) { } bool allChildrenWantsMerge = requestedMergeMask == 0xf; - bool thisChunkWantsSplit = _chunk.update(data) == Chunk::State::WANT_SPLIT; + bool thisChunkWantsSplit = _chunk.update(data) == Chunk::Status::WANT_SPLIT; if (allChildrenWantsMerge && !thisChunkWantsSplit) { merge(); diff --git a/modules/globebrowsing/chunk/chunkrenderer.cpp b/modules/globebrowsing/chunk/chunkrenderer.cpp index dfbd116ad2..6d73d90379 100644 --- a/modules/globebrowsing/chunk/chunkrenderer.cpp +++ b/modules/globebrowsing/chunk/chunkrenderer.cpp @@ -226,7 +226,7 @@ namespace openspace { // Get the texture that should be used for rendering TileAndTransform tileAndTransform = TileSelector::getHighestResolutionTile(tileProvider, chunkIndex); - if (tileAndTransform.tile.status == Tile::State::Unavailable) { + if (tileAndTransform.tile.status == Tile::Status::Unavailable) { // don't render if no tile was available programObject->deactivate(); return nullptr; @@ -243,7 +243,7 @@ namespace openspace { // If blending is enabled, two more textures are needed if (layeredTexturePreprocessingData.layeredTextureInfo[category].layerBlendingEnabled) { TileAndTransform tileAndTransformParent1 = TileSelector::getHighestResolutionTile(tileProvider, chunkIndex, 1); - if (tileAndTransformParent1.tile.status == Tile::State::Unavailable) { + if (tileAndTransformParent1.tile.status == Tile::Status::Unavailable) { tileAndTransformParent1 = tileAndTransform; } activateTileAndSetTileUniforms( @@ -255,7 +255,7 @@ namespace openspace { tileAndTransformParent1); TileAndTransform tileAndTransformParent2 = TileSelector::getHighestResolutionTile(tileProvider, chunkIndex, 2); - if (tileAndTransformParent2.tile.status == Tile::State::Unavailable) { + if (tileAndTransformParent2.tile.status == Tile::Status::Unavailable) { tileAndTransformParent2 = tileAndTransformParent1; } activateTileAndSetTileUniforms( diff --git a/modules/globebrowsing/geometry/aabb.cpp b/modules/globebrowsing/geometry/aabb.cpp index 66267a20eb..43fe4154fd 100644 --- a/modules/globebrowsing/geometry/aabb.cpp +++ b/modules/globebrowsing/geometry/aabb.cpp @@ -66,7 +66,7 @@ namespace openspace { if (o.contains(*this)) return AABBSpatialRelation::Contained; return AABBSpatialRelation::Intersecting; } - return AABBSpatialRelation::NoRelation; + return AABBSpatialRelation::None; } @@ -113,7 +113,7 @@ namespace openspace { if (o.contains(*this)) return AABBSpatialRelation::Contained; return AABBSpatialRelation::Intersecting; } - return AABBSpatialRelation::NoRelation; + return AABBSpatialRelation::None; } @@ -163,7 +163,7 @@ namespace openspace { if (o.contains(*this)) return AABBSpatialRelation::Contained; return AABBSpatialRelation::Intersecting; } - return AABBSpatialRelation::NoRelation; + return AABBSpatialRelation::None; } diff --git a/modules/globebrowsing/geometry/aabb.h b/modules/globebrowsing/geometry/aabb.h index d842721364..ac02a3b39b 100644 --- a/modules/globebrowsing/geometry/aabb.h +++ b/modules/globebrowsing/geometry/aabb.h @@ -37,7 +37,7 @@ namespace openspace { using namespace glm; enum class AABBSpatialRelation { - NoRelation, + None, Intersecting, Contained, Containing diff --git a/modules/globebrowsing/include.cmake b/modules/globebrowsing/include.cmake index ffea0ac430..e69de29bb2 100644 --- a/modules/globebrowsing/include.cmake +++ b/modules/globebrowsing/include.cmake @@ -1 +0,0 @@ -set(DEFAULT_MODULE ON) diff --git a/modules/globebrowsing/tile/temporaltileprovider.cpp b/modules/globebrowsing/tile/temporaltileprovider.cpp index 8e0c457142..5efb3bc3fe 100644 --- a/modules/globebrowsing/tile/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/temporaltileprovider.cpp @@ -116,7 +116,7 @@ namespace openspace { return _currentTileProvider->depthTransform(); } - Tile::State TemporalTileProvider::getTileStatus(const ChunkIndex& chunkIndex) { + Tile::Status TemporalTileProvider::getTileStatus(const ChunkIndex& chunkIndex) { if (_currentTileProvider == nullptr) { LDEBUG("Warning: had to call prerender from getTileStatus()"); prerender(); diff --git a/modules/globebrowsing/tile/temporaltileprovider.h b/modules/globebrowsing/tile/temporaltileprovider.h index 14dc3f6843..01b4a20235 100644 --- a/modules/globebrowsing/tile/temporaltileprovider.h +++ b/modules/globebrowsing/tile/temporaltileprovider.h @@ -121,7 +121,7 @@ namespace openspace { // These methods implements TileProvider virtual Tile getTile(const ChunkIndex& chunkIndex); - virtual Tile::State getTileStatus(const ChunkIndex& chunkIndex); + virtual Tile::Status getTileStatus(const ChunkIndex& chunkIndex); virtual TileDepthTransform depthTransform(); virtual void prerender(); virtual std::shared_ptr getAsyncTileReader(); diff --git a/modules/globebrowsing/tile/tileprovider.cpp b/modules/globebrowsing/tile/tileprovider.cpp index 4596c25afc..a98a4e21c9 100644 --- a/modules/globebrowsing/tile/tileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider.cpp @@ -47,7 +47,7 @@ namespace { namespace openspace { - const Tile Tile::TileUnavailable = {nullptr, nullptr, Tile::State::Unavailable }; + const Tile Tile::TileUnavailable = {nullptr, nullptr, Tile::Status::Unavailable }; @@ -83,7 +83,7 @@ namespace openspace { auto tileDataset = _asyncTextureDataProvider->getTextureDataProvider(); if (chunkIndex.level > tileDataset->getMaximumLevel()) { - tile.status = Tile::State::OutOfRange; + tile.status = Tile::Status::OutOfRange; return tile; } @@ -112,10 +112,10 @@ namespace openspace { _framesSinceLastRequestFlush = 0; } - Tile::State CachingTileProvider::getTileStatus(const ChunkIndex& chunkIndex) { + Tile::Status CachingTileProvider::getTileStatus(const ChunkIndex& chunkIndex) { auto tileDataset = _asyncTextureDataProvider->getTextureDataProvider(); if (chunkIndex.level > tileDataset->getMaximumLevel()) { - return Tile::State::OutOfRange; + return Tile::Status::OutOfRange; } HashKey key = chunkIndex.hashKey(); @@ -124,7 +124,7 @@ namespace openspace { return _tileCache->get(key).status; } - return Tile::State::Unavailable; + return Tile::Status::Unavailable; } @@ -166,7 +166,7 @@ namespace openspace { Tile tile = { texture, tileIOResult->preprocessData, - tileIOResult->error == CE_None ? Tile::State::OK : Tile::State::IOError + tileIOResult->error == CE_None ? Tile::Status::OK : Tile::Status::IOError }; _tileCache->put(key, tile); diff --git a/modules/globebrowsing/tile/tileprovider.h b/modules/globebrowsing/tile/tileprovider.h index c7f20a2be8..4e94ee8da3 100644 --- a/modules/globebrowsing/tile/tileprovider.h +++ b/modules/globebrowsing/tile/tileprovider.h @@ -56,7 +56,7 @@ namespace openspace { std::shared_ptr texture; std::shared_ptr preprocessData; - enum class State { Unavailable, OutOfRange, IOError, OK } status; + enum class Status { Unavailable, OutOfRange, IOError, OK } status; static const Tile TileUnavailable; }; @@ -68,7 +68,7 @@ namespace openspace { virtual ~TileProvider() { } virtual Tile getTile(const ChunkIndex& chunkIndex) = 0; - virtual Tile::State getTileStatus(const ChunkIndex& index) = 0; + virtual Tile::Status getTileStatus(const ChunkIndex& index) = 0; virtual TileDepthTransform depthTransform() = 0; virtual void prerender() = 0; virtual std::shared_ptr getAsyncTileReader() = 0; @@ -94,7 +94,7 @@ namespace openspace { virtual ~CachingTileProvider(); virtual Tile getTile(const ChunkIndex& chunkIndex); - virtual Tile::State getTileStatus(const ChunkIndex& index); + virtual Tile::Status getTileStatus(const ChunkIndex& index); virtual TileDepthTransform depthTransform(); virtual void prerender(); virtual std::shared_ptr getAsyncTileReader(); diff --git a/modules/globebrowsing/tile/tileselector.cpp b/modules/globebrowsing/tile/tileselector.cpp index 6dc591d13b..790fd2cfaa 100644 --- a/modules/globebrowsing/tile/tileselector.cpp +++ b/modules/globebrowsing/tile/tileselector.cpp @@ -61,7 +61,7 @@ namespace openspace { // has a loaded tile ready to use. while (chunkIndex.level > 1) { Tile tile = tileProvider->getTile(chunkIndex); - if (tile.status != Tile::State::OK) { + if (tile.status != Tile::Status::OK) { ascendToParent(chunkIndex, uvTransform); } else return { tile, uvTransform }; diff --git a/modules/iswa/util/luacygnetconverter.cpp b/modules/iswa/util/luacygnetconverter.cpp index 32d08c694a..5ae7600e40 100644 --- a/modules/iswa/util/luacygnetconverter.cpp +++ b/modules/iswa/util/luacygnetconverter.cpp @@ -28,7 +28,7 @@ #include namespace { - using json = nlohmann::json; + using json = nlohmann::json; const std::string _loggerCat = "IswaCygnet"; } @@ -39,9 +39,9 @@ LuaCygnetConverter::~LuaCygnetConverter(){}; std::string LuaCygnetConverter::toLuaTable(std::shared_ptr metadata) const { - //get resource type as enum value - int resourceType; - IswaManager::ref().getResourceType(metadata->resourceType, resourceType); + //get resource type as enum value + int resourceType; + IswaManager::ref().getResourceType(metadata->resourceType, resourceType); std::string luaTable; if (IswaManager::ResourceType::Json == resourceType) @@ -53,7 +53,7 @@ std::string LuaCygnetConverter::toLuaTable(std::shared_ptr metad } std::string LuaCygnetConverter::toLuaTable(CdfInfo info, std::string cut) const { - return kameleonToLuaTable(info, cut); // KameleonPlane + return kameleonToLuaTable(info, cut); // KameleonPlane } std::string LuaCygnetConverter::toLuaTable(std::string name, std::string cdfPath, std::string seedPath) const { diff --git a/modules/iswa/util/luacygnetconverter.h b/modules/iswa/util/luacygnetconverter.h index bc6893cfef..d3e9beb9e8 100644 --- a/modules/iswa/util/luacygnetconverter.h +++ b/modules/iswa/util/luacygnetconverter.h @@ -31,6 +31,7 @@ * used to add a cygnet to the scene. */ #include // for shared_pointer +#include namespace openspace { class MetadataFuture; @@ -41,17 +42,17 @@ public: LuaCygnetConverter(); ~LuaCygnetConverter(); - std::string toLuaTable(std::shared_ptr metadata) const; - std::string toLuaTable(CdfInfo info, std::string cut) const; - std::string toLuaTable(std::string name, std::string cdfPath, std::string seedPath) const; + std::string toLuaTable(std::shared_ptr metadata) const; + std::string toLuaTable(CdfInfo info, std::string cut) const; + std::string toLuaTable(std::string name, std::string cdfPath, std::string seedPath) const; private: - std::string planeToLuaTable(std::shared_ptr data) const; - std::string sphereToLuaTable(std::shared_ptr data) const; - std::string kameleonToLuaTable(CdfInfo info, std::string cut) const; - std::string fieldlineToLuaTable(std::string name, std::string cdfPath, std::string seedPath) const; + std::string planeToLuaTable(std::shared_ptr data) const; + std::string sphereToLuaTable(std::shared_ptr data) const; + std::string kameleonToLuaTable(CdfInfo info, std::string cut) const; + std::string fieldlineToLuaTable(std::string name, std::string cdfPath, std::string seedPath) const; }; } //namespace openspace diff --git a/modules/multiresvolume/include.cmake b/modules/multiresvolume/include.cmake index 3ccace7c97..e69de29bb2 100644 --- a/modules/multiresvolume/include.cmake +++ b/modules/multiresvolume/include.cmake @@ -1 +0,0 @@ -set (DEFAULT_MODULE ON) diff --git a/modules/onscreengui/src/guiperformancecomponent.cpp b/modules/onscreengui/src/guiperformancecomponent.cpp index 0bd4511ab3..9f161dc68d 100644 --- a/modules/onscreengui/src/guiperformancecomponent.cpp +++ b/modules/onscreengui/src/guiperformancecomponent.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include diff --git a/src/interaction/interactionhandler.cpp b/src/interaction/interactionhandler.cpp index d0c7dfa78a..6b238546a0 100644 --- a/src/interaction/interactionhandler.cpp +++ b/src/interaction/interactionhandler.cpp @@ -269,43 +269,43 @@ void InteractionHandler::orbit(const float &dx, const float &dy, const float &dz float rollSpeed = 100.0f; - glm::mat4 transform; - transform = glm::rotate(glm::radians(dx * rotationSpeed), cameraUp) * transform; - transform = glm::rotate(glm::radians(dy * rotationSpeed), cameraRight) * transform; - transform = glm::rotate(glm::radians(dz * rollSpeed), _camera->viewDirection()) * transform; + glm::mat4 transform; + transform = glm::rotate(glm::radians(dx * rotationSpeed), cameraUp) * transform; + transform = glm::rotate(glm::radians(dy * rotationSpeed), cameraRight) * transform; + transform = glm::rotate(glm::radians(dz * rollSpeed), _camera->viewDirection()) * transform; - - - - //// get camera position - //psc relative = _camera->position(); + + + + //// get camera position + //psc relative = _camera->position(); - // get camera position (UNSYNCHRONIZED) - psc relative = _camera->unsynchedPosition(); + // get camera position (UNSYNCHRONIZED) + psc relative = _camera->unsynchedPosition(); - //get relative vector - psc relative_focus_coordinate = relative - focusPos; - //rotate relative vector - relative_focus_coordinate = glm::inverse(transform) * relative_focus_coordinate.vec4(); - - //get new new position of focus node - psc origin; - if (_focusNode) { - origin = _focusNode->worldPosition(); - } + //get relative vector + psc relative_focus_coordinate = relative - focusPos; + //rotate relative vector + relative_focus_coordinate = glm::inverse(transform) * relative_focus_coordinate.vec4(); + + //get new new position of focus node + psc origin; + if (_focusNode) { + origin = _focusNode->worldPosition(); + } - //new camera position - relative = origin + relative_focus_coordinate; + //new camera position + relative = origin + relative_focus_coordinate; - psc target = relative + relative_focus_coordinate * dist * zoomSpeed; + psc target = relative + relative_focus_coordinate * dist * zoomSpeed; - //don't fly into objects - if ((target - origin).length() < focusNodeBounds){ - //target = relative; - } + //don't fly into objects + if ((target - origin).length() < focusNodeBounds){ + //target = relative; + } - unlockControls(); + unlockControls(); _camera->setFocusPosition(origin); @@ -885,6 +885,7 @@ void OrbitalInteractionMode::update(double deltaTime) { updateCameraStateFromMouseStates(); } +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED GlobeBrowsingInteractionMode::GlobeBrowsingInteractionMode( std::shared_ptr inputState, double sensitivity, @@ -893,9 +894,7 @@ GlobeBrowsingInteractionMode::GlobeBrowsingInteractionMode( } -GlobeBrowsingInteractionMode::~GlobeBrowsingInteractionMode() { - -} +GlobeBrowsingInteractionMode::~GlobeBrowsingInteractionMode() {} void GlobeBrowsingInteractionMode::setFocusNode(SceneGraphNode* focusNode) { _focusNode = focusNode; @@ -911,7 +910,6 @@ void GlobeBrowsingInteractionMode::setFocusNode(SceneGraphNode* focusNode) { } - void GlobeBrowsingInteractionMode::updateCameraStateFromMouseStates() { if (_focusNode && _globe) { // Declare variables to use in interaction calculations @@ -989,6 +987,8 @@ void GlobeBrowsingInteractionMode::update(double deltaTime) { updateCameraStateFromMouseStates(); } +#endif + // InteractionHandler InteractionHandler::InteractionHandler() : _origin("origin", "Origin", "") @@ -1014,8 +1014,11 @@ InteractionHandler::InteractionHandler() _inputState = std::shared_ptr(new InputState()); _orbitalInteractionMode = std::shared_ptr( new OrbitalInteractionMode(_inputState, 0.002, 0.02)); + +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED _globebrowsingInteractionMode = std::shared_ptr( new GlobeBrowsingInteractionMode(_inputState, 0.002, 0.02)); +#endif // Set the interactionMode _currentInteractionMode = _orbitalInteractionMode; @@ -1050,9 +1053,11 @@ void InteractionHandler::setInteractionModeToOrbital() { setInteractionMode(_orbitalInteractionMode); } +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED void InteractionHandler::setInteractionModeToGlobeBrowsing() { setInteractionMode(_globebrowsingInteractionMode); } +#endif void InteractionHandler::lockControls() { diff --git a/src/interaction/interactionhandler_lua.inl b/src/interaction/interactionhandler_lua.inl index 9fdbf19a61..dbf83aac88 100644 --- a/src/interaction/interactionhandler_lua.inl +++ b/src/interaction/interactionhandler_lua.inl @@ -134,7 +134,11 @@ int setInteractionMode(lua_State* L) { OsEng.interactionHandler().setInteractionModeToOrbital(); } else if (interactionModeName == "GlobeBrowsingInteractionMode") { +#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED OsEng.interactionHandler().setInteractionModeToGlobeBrowsing(); +#else + return luaL_error(L, "OpenSpace compiled without support for GlobeBrowsing"); +#endif } else { // Default return luaL_error(L, "Unknown interaction mode. default is 'OrbitalInteractionMode'"); diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 8f8f4afc74..0ce4b5ab31 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include namespace { const std::string _loggerCat = "SpiceManager"; diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index 687780c459..89681cf9fc 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -24,7 +24,7 @@ #include -#include +#include #include namespace openspace { diff --git a/tests/main.cpp b/tests/main.cpp index e32b373a65..5f978b987d 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -31,7 +31,6 @@ #include // test files -// <<<<<<< HEAD //#include //#include //#include @@ -39,7 +38,7 @@ //#include //#include //#include -#include +//#include //#include //#include @@ -53,15 +52,6 @@ //#include //#include //#include -// ======= -#include -#include -#include -#include -#include -#include -#include -// >>>>>>> develop #include #include