More cleanup

This commit is contained in:
Jonas Strandstedt
2014-10-24 13:34:03 +02:00
parent ed3063ab86
commit ea3c5e8d11
9 changed files with 34 additions and 38 deletions

View File

@@ -25,21 +25,23 @@
#ifndef INTERACTIONHANDLER_H
#define INTERACTIONHANDLER_H
// open space includes
#include <openspace/util/camera.h>
#include <openspace/interaction/externalcontrol/externalcontrol.h>
#include <openspace/scenegraph/scenegraphnode.h>
#include <openspace/scripting/scriptengine.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/util/powerscaledscalar.h>
// std includes
#include <vector>
#include <thread>
#include <mutex>
#include <memory>
#include <map>
#include <functional>
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;

View File

@@ -25,16 +25,17 @@
#ifndef __RENDERABLE_H__
#define __RENDERABLE_H__
// openspace
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/scalarproperty.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/util/powerscaledscalar.h>
#include <openspace/util/camera.h>
#include <openspace/util/updatestructures.h>
// ghoul
#include <ghoul/misc/dictionary.h>
#include <ghoul/opengl/programobject.h>
#include <openspace/properties/propertyowner.h>
#include <openspace/util/updatestructures.h>
namespace openspace {

View File

@@ -26,8 +26,6 @@
#define __RENDERENGINE_H__
#include <openspace/scripting/scriptengine.h>
#include <memory>
#include <string>
namespace openspace {

View File

@@ -27,7 +27,6 @@
// ghoul includes
#include <ghoul/misc/templatefactory.h>
#include <ghoul/logging/logmanager.h>
namespace openspace {

View File

@@ -24,15 +24,13 @@
#include <openspace/engine/openspaceengine.h>
// sgct header has to be included before all others due to Windows header
#define SGCT_WINDOWS_INCLUDE
#include <sgct.h>
// openspace
#include <openspace/interaction/deviceidentifier.h>
#include <openspace/interaction/interactionhandler.h>
#include <openspace/interaction/luaconsole.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/scripting/scriptengine.h>
#include <openspace/scenegraph/scenegraph.h>
#include <openspace/util/time.h>
#include <openspace/util/spicemanager.h>
#include <openspace/util/factorymanager.h>
@@ -40,7 +38,9 @@
#include <openspace/util/spicemanager.h>
#include <openspace/util/syncbuffer.h>
// ghoul
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/filesystem/cachemanager.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/logging/consolelog.h>
#include <ghoul/systemcapabilities/systemcapabilities.h>
@@ -48,8 +48,12 @@
#include <ghoul/lua/lua_helper.h>
#include <ghoul/cmdparser/commandlineparser.h>
#include <ghoul/cmdparser/singlecommand.h>
#include <ghoul/filesystem/cachemanager.h>
// sgct
#define SGCT_WINDOWS_INCLUDE
#include <sgct.h>
// std
#include <iostream>
#include <fstream>
@@ -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");
}

View File

@@ -29,10 +29,13 @@
#include <sgct.h>
#include <openspace/interaction/deviceidentifier.h>
#include <openspace/interaction/externalcontrol/externalcontrol.h>
#include <openspace/interaction/externalcontrol/randomexternalcontrol.h>
#include <openspace/interaction/externalcontrol/joystickexternalcontrol.h>
#include <openspace/query/query.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/scenegraph/scenegraphnode.h>
#include <openspace/util/camera.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <glm/gtx/vector_angle.hpp>

View File

@@ -26,6 +26,8 @@
#include <openspace/engine/openspaceengine.h>
#include <openspace/rendering/renderable.h>
#include <openspace/scenegraph/scenegraph.h>
#include <openspace/scenegraph/scenegraphnode.h>
namespace openspace {

View File

@@ -24,9 +24,9 @@
// open space includes
#include <openspace/scenegraph/scenegraph.h>
#include <openspace/scenegraph/scenegraphnode.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/interaction/interactionhandler.h>
#include <openspace/rendering/planets/renderableplanet.h>
#include <openspace/scripting/scriptengine.h>
#include <openspace/util/constants.h>
#include <openspace/query/query.h>
@@ -34,9 +34,8 @@
#include <openspace/abuffer/abuffer.h>
// 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 <ghoul/misc/dictionary.h>
#include <ghoul/lua/ghoul_lua.h>
#include <ghoul/lua/lua_helper.h>
#include <ghoul/opengl/shadermanager.h>
#include <iostream>
#include <fstream>
#include <string>
#include <chrono>
//#include <unistd.h>
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

View File

@@ -24,27 +24,26 @@
#include <openspace/util/factorymanager.h>
#include <cassert>
// renderables
#include <openspace/rendering/renderablewavefrontobject.h>
#include <openspace/rendering/stars/renderablestars.h>
#include <openspace/rendering/renderableephemeris.h>
#include <openspace/rendering/renderabletrail.h>
#include <openspace/rendering/renderablepath.h>
#include <openspace/rendering/renderablefov.h>
#include <openspace/rendering/renderablesphericalgrid.h>
#include <openspace/rendering/renderablefieldlines.h>
#include <openspace/rendering/planets/renderableplanet.h>
#include <openspace/rendering/renderableplane.h>
#include <openspace/rendering/renderablevolumegl.h>
#include <openspace/rendering/planets/simplespheregeometry.h>
// positioninformation
#include <openspace/scenegraph/staticephemeris.h>
#include <openspace/scenegraph/spiceephemeris.h>
#include <openspace/rendering/planets/simplespheregeometry.h>
// std
#include <cassert>
namespace openspace {