Clean include guards in OpenSpace core

Remove unused files
This commit is contained in:
Alexander Bock
2016-12-09 13:54:22 +01:00
parent df543f0ec3
commit d139dd2d22
152 changed files with 681 additions and 1681 deletions
+3 -3
View File
@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __CONTROLLER_H__
#define __CONTROLLER_H__
#ifndef __OPENSPACE_CORE___CONTROLLER___H__
#define __OPENSPACE_CORE___CONTROLLER___H__
#include <openspace/scene/scenegraphnode.h>
@@ -50,4 +50,4 @@ protected:
} // namespace interaction
} // namespace openspace
#endif // __CONTROLLER_H__
#endif // __OPENSPACE_CORE___CONTROLLER___H__
@@ -1,5 +1,29 @@
#ifndef DEVICEIDENTIFIER_H
#define DEVICEIDENTIFIER_H
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___DEVICEIDENTIFIER___H__
#define __OPENSPACE_CORE___DEVICEIDENTIFIER___H__
// std includes
#include <array>
@@ -52,4 +76,4 @@ private:
} // namespace openspace
#endif
#endif // __OPENSPACE_CORE___DEVICEIDENTIFIER___H__
@@ -1,24 +0,0 @@
#ifndef EXTERNALCONNECTIONCONTROLLER_H
#define EXTERNALCONNECTIONCONTROLLER_H
#include <openspace/interaction/externalcontrol/externalcontrol.h>
#include <vector>
namespace openspace {
class ExternalConnectionController: public ExternalControl {
public:
// constructors & destructor
ExternalConnectionController();
~ExternalConnectionController();
private:
std::vector<ExternalControl*> controllers;
};
} // namespace openspace
#endif
@@ -1,29 +0,0 @@
#ifndef EXTERNALCONTROL_H
#define EXTERNALCONTROL_H
#include <openspace/util/powerscaledscalar.h>
#include <ghoul/glm.h>
#include <glm/gtc/quaternion.hpp>
namespace openspace {
class ExternalControl {
public:
// constructors & destructor
ExternalControl();
virtual ~ExternalControl();
virtual void update();
void rotate(const glm::quat &rotation);
void orbit(const glm::quat &rotation);
void distance(const PowerScaledScalar &distance);
protected:
};
} // namespace openspace
#endif
@@ -1,28 +0,0 @@
//#ifndef JOYSTICKEXTERNALCONTROL_H
//#define JOYSTICKEXTERNALCONTROL_H
//
//#include "externalcontrol/pythonexternalcontrol.h"
//
//namespace openspace {
//
//class JoystickExternalControl: public PythonExternalControl {
//public:
//
// // constructors & destructor
// JoystickExternalControl(const char *filename);
// ~JoystickExternalControl();
//
// void setInputDevice(const int device);
// void update();
//
//private:
//
// // joystick
// int inputDevice_;
// int numberOfButtons_;
// int numberOfAxes_;
//};
//
//} // namespace openspace
//
//#endif
@@ -1,25 +0,0 @@
//#ifndef KEYBOARDEXTERNALCONTROL_H
//#define KEYBOARDEXTERNALCONTROL_H
//
//#include "externalcontrol/pythonexternalcontrol.h"
//
//namespace openspace {
//
//class KeyboardExternalControl: public PythonExternalControl {
//public:
//
// // constructors & destructor
// KeyboardExternalControl(const char *filename);
// ~KeyboardExternalControl();
//
// void update();
//
// void keyboardCallback(int key, int action);
//private:
// int *keys_;
//
//};
//
//} // namespace openspace
//
//#endif
@@ -1,28 +0,0 @@
//#ifndef MOUSEEXTERNALCONTROL_H
//#define MOUSEEXTERNALCONTROL_H
//
//#include "externalcontrol/pythonexternalcontrol.h"
//
//namespace openspace {
//
//class MouseExternalControl: public PythonExternalControl {
//public:
//
// // constructors & destructor
// MouseExternalControl(const char *filename);
// ~MouseExternalControl();
//
// void update();
//
// void mouseButtonCallback(int key, int action);
// void mousePosCallback(int x, int y);
// void mouseScrollCallback(int pos);
//private:
//
// int x_, y_, pos_, button1_, button2_, button3_;
//
//};
//
//} // namespace openspace
//
//#endif
@@ -1,35 +0,0 @@
//#ifndef PYTHONEXTERNALCONTROL_H
//#define PYTHONEXTERNALCONTROL_H
//
//#include <thread>
//#include <mutex>
//
//#include "externalcontrol/externalcontrol.h"
//#include "python/pythonscript.h"
//
//namespace openspace {
//
//class PythonExternalControl: public ExternalControl {
//public:
//
// // constructors & destructor
// PythonExternalControl(const char *filename);
// ~PythonExternalControl();
//
// static PyMethodDef* getMethodDef();
//
// void message(const char *text);
// virtual void update();
// void clear();
//private:
// PythonScript ps_;
//
//protected:
// void run();
// int pyarrSize_;
// PyObject **pyarr_;
//};
//
//} // namespace openspace
//
//#endif
@@ -1,26 +0,0 @@
#ifndef RANDOMEXTERNALCONTROL_H
#define RANDOMEXTERNALCONTROL_H
#include <thread>
#include <mutex>
#include <openspace/interaction/externalcontrol/externalcontrol.h>
namespace openspace {
class RandomExternalControl: public ExternalControl {
public:
// constructors & destructor
RandomExternalControl();
~RandomExternalControl();
private:
std::mutex inputGuard;
bool *keepGoing_;
// std::thread *backgroundThread;
};
} // namespace openspace
#endif
@@ -22,11 +22,10 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __INTERACTIONHANDLER_H__
#define __INTERACTIONHANDLER_H__
#ifndef __OPENSPACE_CORE___INTERACTIONHANDLER___H__
#define __OPENSPACE_CORE___INTERACTIONHANDLER___H__
#include <openspace/interaction/keyboardcontroller.h>
#include <openspace/interaction/mousecontroller.h>
#include <openspace/interaction/interactionmode.h>
#include <openspace/network/parallelconnection.h>
#include <openspace/properties/propertyowner.h>
@@ -158,4 +157,4 @@ private:
} // namespace interaction
} // namespace openspace
#endif // __INTERACTIONHANDLER_H__
#endif // __OPENSPACE_CORE___INTERACTIONHANDLER___H__
@@ -22,11 +22,10 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __INTERACTION_MODE_H__
#define __INTERACTION_MODE_H__
#ifndef __OPENSPACE_CORE___INTERACTIONMODE___H__
#define __OPENSPACE_CORE___INTERACTIONMODE___H__
#include <openspace/interaction/keyboardcontroller.h>
#include <openspace/interaction/mousecontroller.h>
#include <openspace/network/parallelconnection.h>
#include <openspace/util/mouse.h>
#include <openspace/util/keys.h>
@@ -281,4 +280,4 @@ private:
} // namespace interaction
} // namespace openspace
#endif // __INTERACTION_MODE_H__
#endif // __OPENSPACE_CORE___INTERACTIONMODE___H__
@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __KEYBOARDCONTROLLER_H__
#define __KEYBOARDCONTROLLER_H__
#ifndef __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__
#define __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__
#include <openspace/interaction/controller.h>
@@ -54,4 +54,4 @@ protected:
} // namespace interaction
} // namespace openspace
#endif // __KEYBOARDCONTROLLER_H__
#endif // __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__
+3 -3
View File
@@ -22,8 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef LUACONSOLE_H
#define LUACONSOLE_H
#ifndef __OPENSPACE_CORE___LUACONSOLE___H__
#define __OPENSPACE_CORE___LUACONSOLE___H__
#include <openspace/scripting/scriptengine.h>
#include <openspace/network/parallelconnection.h>
@@ -83,4 +83,4 @@ private:
} // namespace openspace
#endif
#endif // __OPENSPACE_CORE___LUACONSOLE___H__
@@ -1,111 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
//#define USE_OLD_INTERACTIONHANDLER
#ifdef USE_OLD_INTERACTIONHANDLER
#ifndef __MOUSECONTROLLER_H__
#define __MOUSECONTROLLER_H__
#include <openspace/interaction/controller.h>
#include <openspace/util/mouse.h>
#include <ghoul/glm.h>
namespace openspace {
namespace interaction {
class MouseController : public Controller {
public:
MouseController();
virtual ~MouseController() {}
virtual void button(MouseButton button, MouseAction action) = 0;
virtual void move(float x, float y) = 0;
virtual void scrollWheel(int pos) = 0;
virtual void update(const double& dt) = 0;
protected:
glm::vec3 _lastTrackballPos;
bool _isMouseBeingPressedAndHeld;
glm::vec3 mapToTrackball(glm::vec2 mousePos);
glm::vec3 mapToCamera(glm::vec3 trackballPos);
void trackballRotate(int x, int y);
};
class TrackballMouseController : public MouseController {
public:
TrackballMouseController();
void button(MouseButton button, MouseAction action) override;
void move(float x, float y) override;
void scrollWheel(int pos) override;
void update(const double& dt) override;
protected:
bool _leftMouseButtonDown;
glm::vec3 _previousTrackballPos;
};
class OrbitalMouseController : public MouseController {
public:
OrbitalMouseController();
void button(MouseButton button, MouseAction action) override;
void move(float x, float y) override;
void scrollWheel(int pos) override;
void update(const double& dt) override;
protected:
bool _leftMouseButtonDown;
bool _rightMouseButtonDown;
bool _middleMouseButtonDown;
glm::vec2 _previousCursorPos[3];
glm::vec2 _currentCursorPos;
glm::vec2 _currentCursorDiff[3];
float _rotationSpeed;
float _navigationSpeed;
private:
enum MouseButtons{ ButtonLeft = 0, ButtonRight, ButtonMiddle };
};
} // namespace interaction
} // namespace openspace
#endif // __MOUSECONTROLLER_H__
#endif // USE_OLD_INTERACTIONHANDLER