diff --git a/include/openspace/interaction/interactionhandler.h b/include/openspace/interaction/interactionhandler.h index 711240916b..03266e83ab 100644 --- a/include/openspace/interaction/interactionhandler.h +++ b/include/openspace/interaction/interactionhandler.h @@ -25,21 +25,23 @@ #ifndef INTERACTIONHANDLER_H #define INTERACTIONHANDLER_H -// open space includes -#include -#include -#include +#include +#include +#include // std includes #include -#include #include -#include #include #include namespace openspace { +// Forward declare to minimize dependencies +class Camera; +class SceneGraphNode; +class ExternalControl; + class InteractionHandler { public: InteractionHandler(void); @@ -47,11 +49,6 @@ public: InteractionHandler& operator=(const InteractionHandler& rhs); virtual ~InteractionHandler(); - //static void init(); - //static void deinit(); - // static InteractionHandler& ref(); - //static bool isInitialized(); - void enable(); void disable(); const bool isEnabled() const; @@ -62,7 +59,7 @@ public: void setCamera(Camera *camera = nullptr); void setOrigin(SceneGraphNode* node); - Camera * getCamera() const; + Camera* getCamera() const; const psc getOrigin() const; void lockControls(); void unlockControls(); @@ -90,7 +87,7 @@ public: /** * Returns the Lua library that contains all Lua functions available to affect the * interaction. The functions contained are - * - openspace::luascriptfunctions::printScreen + * - openspace::luascriptfunctions::setOrigin * \return The Lua library that contains all Lua functions available to affect the * interaction */ @@ -107,7 +104,6 @@ private: double dt_; - glm::vec3 _lastTrackballPos; bool _leftMouseButtonDown, _isMouseBeingPressedAndHeld; diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 81bb33967c..0da113c7c7 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -25,16 +25,17 @@ #ifndef __RENDERABLE_H__ #define __RENDERABLE_H__ +// openspace #include - #include #include #include #include +#include + +// ghoul #include #include -#include -#include namespace openspace { diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 0f410a09eb..a741c7a191 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -26,8 +26,6 @@ #define __RENDERENGINE_H__ #include - -#include #include namespace openspace { diff --git a/include/openspace/util/factorymanager.h b/include/openspace/util/factorymanager.h index 50593fa899..bfddf025fb 100644 --- a/include/openspace/util/factorymanager.h +++ b/include/openspace/util/factorymanager.h @@ -27,7 +27,6 @@ // ghoul includes #include -#include namespace openspace { diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index e4c01805e1..09f8f24776 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -24,15 +24,13 @@ #include -// sgct header has to be included before all others due to Windows header -#define SGCT_WINDOWS_INCLUDE -#include - +// openspace #include #include #include #include #include +#include #include #include #include @@ -40,7 +38,9 @@ #include #include +// ghoul #include +#include #include #include #include @@ -48,8 +48,12 @@ #include #include #include -#include +// sgct +#define SGCT_WINDOWS_INCLUDE +#include + +// std #include #include @@ -271,7 +275,7 @@ bool OpenSpaceEngine::create(int argc, char** argv, auto tokens = FileSys.tokens(); const std::string cacheToken = "${CACHE}"; auto cacheIterator = std::find(tokens.begin(), tokens.end(), cacheToken); - if (cacheIterator != tokens.end()){ + if (cacheIterator == tokens.end()){ FileSys.registerPathToken(cacheToken, "${BASE_PATH}/cache"); } diff --git a/src/interaction/interactionhandler.cpp b/src/interaction/interactionhandler.cpp index 2b8a7bff61..3ab7198f5a 100644 --- a/src/interaction/interactionhandler.cpp +++ b/src/interaction/interactionhandler.cpp @@ -29,10 +29,13 @@ #include #include +#include #include #include #include #include +#include +#include #include #include diff --git a/src/query/query.cpp b/src/query/query.cpp index 404758a59f..9b2ad06a97 100644 --- a/src/query/query.cpp +++ b/src/query/query.cpp @@ -26,6 +26,8 @@ #include #include +#include +#include namespace openspace { diff --git a/src/scenegraph/scenegraph.cpp b/src/scenegraph/scenegraph.cpp index e2165bf01a..6d66349f68 100644 --- a/src/scenegraph/scenegraph.cpp +++ b/src/scenegraph/scenegraph.cpp @@ -24,9 +24,9 @@ // open space includes #include +#include #include #include -#include #include #include #include @@ -34,9 +34,8 @@ #include // ghoul includes -#include "ghoul/opengl/programobject.h" #include "ghoul/logging/logmanager.h" -#include "ghoul/logging/consolelog.h" +#include "ghoul/opengl/programobject.h" #include "ghoul/opengl/texturereader.h" #include "ghoul/opengl/texture.h" @@ -44,14 +43,11 @@ #include #include #include -#include #include #include #include - #include - //#include namespace { const std::string _loggerCat = "SceneGraph"; @@ -523,7 +519,6 @@ SceneGraphNode* SceneGraph::sceneGraphNode(const std::string& name) const { } scripting::ScriptEngine::LuaLibrary SceneGraph::luaLibrary() { - //scripting::ScriptEngine::LuaLibrary sceneGraphLibrary = { return { "", { @@ -548,7 +543,6 @@ scripting::ScriptEngine::LuaLibrary SceneGraph::luaLibrary() { } } }; - //return std::move(sceneGraphLibrary); } } // namespace openspace diff --git a/src/util/factorymanager.cpp b/src/util/factorymanager.cpp index 0530b551a9..a58fc69066 100644 --- a/src/util/factorymanager.cpp +++ b/src/util/factorymanager.cpp @@ -24,27 +24,26 @@ #include -#include - // renderables #include #include #include #include #include - #include #include #include #include #include #include +#include // positioninformation #include #include -#include +// std +#include namespace openspace {