diff --git a/include/openspace/documentation/core_registration.h b/include/openspace/documentation/core_registration.h index 61a462eddf..5688a6c24e 100644 --- a/include/openspace/documentation/core_registration.h +++ b/include/openspace/documentation/core_registration.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __CORE_REGISTRATION_H__ -#define __CORE_REGISTRATION_H__ +#ifndef __OPENSPACE_CORE___REGISTRATION___H__ +#define __OPENSPACE_CORE___REGISTRATION___H__ namespace openspace { @@ -35,4 +35,4 @@ void registerCoreClasses(scripting::ScriptEngine& engine); } // namespace openspace -#endif // __CORE_REGISTRATION_H__ +#endif // __OPENSPACE_CORE___REGISTRATION___H__ diff --git a/include/openspace/documentation/documentation.h b/include/openspace/documentation/documentation.h index 39015df384..2c4e39fcf2 100644 --- a/include/openspace/documentation/documentation.h +++ b/include/openspace/documentation/documentation.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DOCUMENTATION_H__ -#define __DOCUMENTATION_H__ +#ifndef __OPENSPACE_CORE___DOCUMENTATION___H__ +#define __OPENSPACE_CORE___DOCUMENTATION___H__ #include #include @@ -317,6 +317,6 @@ namespace std { std::string to_string(openspace::documentation::TestResult::Offense::Reason reason); -} // namespace +} // namespace std -#endif // __DOCUMENTATION_H__ +#endif // __OPENSPACE_CORE___DOCUMENTATION___H__ diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h index 7f8851686b..95fcca5f98 100644 --- a/include/openspace/documentation/documentationengine.h +++ b/include/openspace/documentation/documentationengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DOCUMENTATIONENGINE_H__ -#define __DOCUMENTATIONENGINE_H__ +#ifndef __OPENSPACE_CORE___DOCUMENTATIONENGINE___H__ +#define __OPENSPACE_CORE___DOCUMENTATIONENGINE___H__ #include @@ -99,4 +99,4 @@ private: #define DocEng (openspace::documentation::DocumentationEngine::ref()) -#endif // __DOCUMENTATIONENGINE_H__ +#endif // __OPENSPACE_CORE___DOCUMENTATIONENGINE___H__ diff --git a/include/openspace/documentation/verifier.h b/include/openspace/documentation/verifier.h index bc8dd451b7..22ae0452d5 100644 --- a/include/openspace/documentation/verifier.h +++ b/include/openspace/documentation/verifier.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VERIFIER_H__ -#define __VERIFIER_H__ +#ifndef __OPENSPACE_CORE___VERIFIER___H__ +#define __OPENSPACE_CORE___VERIFIER___H__ #include @@ -1141,4 +1141,4 @@ extern template struct DeprecatedVerifier; #include "verifier.inl" -#endif // __VERIFIER_H__ +#endif // __OPENSPACE_CORE___VERIFIER___H__ diff --git a/include/openspace/engine/configurationmanager.h b/include/openspace/engine/configurationmanager.h index f63649a8b6..3fef274c62 100644 --- a/include/openspace/engine/configurationmanager.h +++ b/include/openspace/engine/configurationmanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __CONFIGURATIONMANAGER_H__ -#define __CONFIGURATIONMANAGER_H__ +#ifndef __OPENSPACE_CORE___CONFIGURATIONMANAGER___H__ +#define __OPENSPACE_CORE___CONFIGURATIONMANAGER___H__ #include @@ -167,4 +167,4 @@ private: } // namespace openspace -#endif // __CONFIGURATIONMANAGER_H__ +#endif // __OPENSPACE_CORE___CONFIGURATIONMANAGER___H__ diff --git a/include/openspace/engine/downloadmanager.h b/include/openspace/engine/downloadmanager.h index cabcf0a14b..900c99eebc 100644 --- a/include/openspace/engine/downloadmanager.h +++ b/include/openspace/engine/downloadmanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DOWNLOADMANAGER_H__ -#define __DOWNLOADMANAGER_H__ +#ifndef __OPENSPACE_CORE___DOWNLOADMANAGER___H__ +#define __OPENSPACE_CORE___DOWNLOADMANAGER___H__ #include #include @@ -119,4 +119,4 @@ private: } // namespace openspace -#endif // __DOWNLOADMANAGER_H__ +#endif // __OPENSPACE_CORE___DOWNLOADMANAGER___H__ diff --git a/include/openspace/engine/logfactory.h b/include/openspace/engine/logfactory.h index d3067f213c..a2fb2b3c21 100644 --- a/include/openspace/engine/logfactory.h +++ b/include/openspace/engine/logfactory.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __LOGFACTORY_H__ -#define __LOGFACTORY_H__ +#ifndef __OPENSPACE_CORE___LOGFACTORY___H__ +#define __OPENSPACE_CORE___LOGFACTORY___H__ #include @@ -55,4 +55,4 @@ std::unique_ptr createLog(const ghoul::Dictionary& dictiona } // namespace openspace -#endif // __LOGFACTORY_H__ +#endif // __OPENSPACE_CORE___LOGFACTORY___H__ diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h index 2e06a4f930..df40f23983 100644 --- a/include/openspace/engine/moduleengine.h +++ b/include/openspace/engine/moduleengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MODULEENGINE_H__ -#define __MODULEENGINE_H__ +#ifndef __OPENSPACE_CORE___MODULEENGINE___H__ +#define __OPENSPACE_CORE___MODULEENGINE___H__ #include #include @@ -96,4 +96,4 @@ private: } // namespace openspace -#endif // __MODULEENGINE_H__ +#endif // __OPENSPACE_CORE___MODULEENGINE___H__ diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index 6e72f376c0..9070e07f92 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACEENGINE_H__ -#define __OPENSPACEENGINE_H__ +#ifndef __OPENSPACE_CORE___OPENSPACEENGINE___H__ +#define __OPENSPACE_CORE___OPENSPACEENGINE___H__ #include #include @@ -185,6 +185,6 @@ private: #define OsEng (openspace::OpenSpaceEngine::ref()) -} // namespace openspace +} // namespace openspace -#endif // __OPENSPACEENGINE_H__ +#endif // __OPENSPACE_CORE___OPENSPACEENGINE___H__ diff --git a/include/openspace/engine/settingsengine.h b/include/openspace/engine/settingsengine.h index c7098725f0..e42ab81f23 100644 --- a/include/openspace/engine/settingsengine.h +++ b/include/openspace/engine/settingsengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SETTINGSENGINE_H__ -#define __SETTINGSENGINE_H__ +#ifndef __OPENSPACE_CORE___SETTINGSENGINE___H__ +#define __OPENSPACE_CORE___SETTINGSENGINE___H__ #include @@ -69,4 +69,4 @@ private: } // namespace openspace -#endif //#ifndef __SETTINGSENGINE_H__ +#endif // __OPENSPACE_CORE___SETTINGSENGINE___H__ diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h index c10a7833d0..aa87c909f9 100644 --- a/include/openspace/engine/syncengine.h +++ b/include/openspace/engine/syncengine.h @@ -22,14 +22,12 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SYNCENGINE_H__ -#define __SYNCENGINE_H__ - +#ifndef __OPENSPACE_CORE___SYNCENGINE___H__ +#define __OPENSPACE_CORE___SYNCENGINE___H__ #include #include - namespace openspace { class Syncable; @@ -103,4 +101,4 @@ private: } // namespace openspace -#endif //#ifndef __SYNCENGINE_H__ +#endif // __OPENSPACE_CORE___SYNCENGINE___H__ diff --git a/include/openspace/engine/wrapper/sgctwindowwrapper.h b/include/openspace/engine/wrapper/sgctwindowwrapper.h index 678e2fe25e..377bda3f42 100644 --- a/include/openspace/engine/wrapper/sgctwindowwrapper.h +++ b/include/openspace/engine/wrapper/sgctwindowwrapper.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SGCTWINDOWWRAPPER_H__ -#define __SGCTWINDOWWRAPPER_H__ +#ifndef __OPENSPACE_CORE___SGCTWINDOWWRAPPER___H__ +#define __OPENSPACE_CORE___SGCTWINDOWWRAPPER___H__ #include @@ -75,4 +75,4 @@ public: } // namespace openspace -#endif // __SGCTWINDOWWRAPPER_H__ +#endif // __OPENSPACE_CORE___SGCTWINDOWWRAPPER___H__ diff --git a/include/openspace/engine/wrapper/windowwrapper.h b/include/openspace/engine/wrapper/windowwrapper.h index 75924841bc..89c92121f9 100644 --- a/include/openspace/engine/wrapper/windowwrapper.h +++ b/include/openspace/engine/wrapper/windowwrapper.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __WINDOWWRAPPER_H__ -#define __WINDOWWRAPPER_H__ +#ifndef __OPENSPACE_CORE___WINDOWWRAPPER___H__ +#define __OPENSPACE_CORE___WINDOWWRAPPER___H__ #include #include @@ -258,4 +258,4 @@ public: } // namespace openspace -#endif // _WINDOW_H__ +#endif // __OPENSPACE_CORE___WINDOWWRAPPER___H__ diff --git a/include/openspace/interaction/controller.h b/include/openspace/interaction/controller.h index 3afb45b8df..5daf93cd01 100644 --- a/include/openspace/interaction/controller.h +++ b/include/openspace/interaction/controller.h @@ -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 @@ -50,4 +50,4 @@ protected: } // namespace interaction } // namespace openspace -#endif // __CONTROLLER_H__ +#endif // __OPENSPACE_CORE___CONTROLLER___H__ diff --git a/include/openspace/interaction/deviceidentifier.h b/include/openspace/interaction/deviceidentifier.h index e021fac9aa..828bf4fa42 100644 --- a/include/openspace/interaction/deviceidentifier.h +++ b/include/openspace/interaction/deviceidentifier.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 @@ -52,4 +76,4 @@ private: } // namespace openspace -#endif +#endif // __OPENSPACE_CORE___DEVICEIDENTIFIER___H__ diff --git a/include/openspace/interaction/externalcontrol/externalconnectioncontroller.h b/include/openspace/interaction/externalcontrol/externalconnectioncontroller.h deleted file mode 100644 index 6af23c76b4..0000000000 --- a/include/openspace/interaction/externalcontrol/externalconnectioncontroller.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef EXTERNALCONNECTIONCONTROLLER_H -#define EXTERNALCONNECTIONCONTROLLER_H - -#include -#include - -namespace openspace { - -class ExternalConnectionController: public ExternalControl { -public: - - // constructors & destructor - ExternalConnectionController(); - ~ExternalConnectionController(); - -private: - - std::vector controllers; - -}; - -} // namespace openspace - -#endif diff --git a/include/openspace/interaction/externalcontrol/externalcontrol.h b/include/openspace/interaction/externalcontrol/externalcontrol.h deleted file mode 100644 index 10dad0815e..0000000000 --- a/include/openspace/interaction/externalcontrol/externalcontrol.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef EXTERNALCONTROL_H -#define EXTERNALCONTROL_H - -#include -#include -#include - -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 diff --git a/include/openspace/interaction/externalcontrol/joystickexternalcontrol.h b/include/openspace/interaction/externalcontrol/joystickexternalcontrol.h deleted file mode 100644 index 4182d3c102..0000000000 --- a/include/openspace/interaction/externalcontrol/joystickexternalcontrol.h +++ /dev/null @@ -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 \ No newline at end of file diff --git a/include/openspace/interaction/externalcontrol/keyboardexternalcontrol.h b/include/openspace/interaction/externalcontrol/keyboardexternalcontrol.h deleted file mode 100644 index 9a01732944..0000000000 --- a/include/openspace/interaction/externalcontrol/keyboardexternalcontrol.h +++ /dev/null @@ -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 \ No newline at end of file diff --git a/include/openspace/interaction/externalcontrol/mouseexternalcontrol.h b/include/openspace/interaction/externalcontrol/mouseexternalcontrol.h deleted file mode 100644 index cbd5cec7d3..0000000000 --- a/include/openspace/interaction/externalcontrol/mouseexternalcontrol.h +++ /dev/null @@ -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 \ No newline at end of file diff --git a/include/openspace/interaction/externalcontrol/pythonexternalcontrol.h b/include/openspace/interaction/externalcontrol/pythonexternalcontrol.h deleted file mode 100644 index 432f1c6d9a..0000000000 --- a/include/openspace/interaction/externalcontrol/pythonexternalcontrol.h +++ /dev/null @@ -1,35 +0,0 @@ -//#ifndef PYTHONEXTERNALCONTROL_H -//#define PYTHONEXTERNALCONTROL_H -// -//#include -//#include -// -//#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 \ No newline at end of file diff --git a/include/openspace/interaction/externalcontrol/randomexternalcontrol.h b/include/openspace/interaction/externalcontrol/randomexternalcontrol.h deleted file mode 100644 index 171ab2c79a..0000000000 --- a/include/openspace/interaction/externalcontrol/randomexternalcontrol.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef RANDOMEXTERNALCONTROL_H -#define RANDOMEXTERNALCONTROL_H - -#include -#include - -#include - -namespace openspace { - -class RandomExternalControl: public ExternalControl { -public: - - // constructors & destructor - RandomExternalControl(); - ~RandomExternalControl(); - -private: - std::mutex inputGuard; - bool *keepGoing_; - // std::thread *backgroundThread; -}; - -} // namespace openspace - -#endif \ No newline at end of file diff --git a/include/openspace/interaction/interactionhandler.h b/include/openspace/interaction/interactionhandler.h index 04a9262ce6..f4e9589573 100644 --- a/include/openspace/interaction/interactionhandler.h +++ b/include/openspace/interaction/interactionhandler.h @@ -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 -#include #include #include #include @@ -158,4 +157,4 @@ private: } // namespace interaction } // namespace openspace -#endif // __INTERACTIONHANDLER_H__ +#endif // __OPENSPACE_CORE___INTERACTIONHANDLER___H__ diff --git a/include/openspace/interaction/interactionmode.h b/include/openspace/interaction/interactionmode.h index 25688a2e77..a3a479453f 100644 --- a/include/openspace/interaction/interactionmode.h +++ b/include/openspace/interaction/interactionmode.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 -#include #include #include #include @@ -281,4 +280,4 @@ private: } // namespace interaction } // namespace openspace -#endif // __INTERACTION_MODE_H__ +#endif // __OPENSPACE_CORE___INTERACTIONMODE___H__ diff --git a/include/openspace/interaction/keyboardcontroller.h b/include/openspace/interaction/keyboardcontroller.h index 94550e2869..07933e5bc7 100644 --- a/include/openspace/interaction/keyboardcontroller.h +++ b/include/openspace/interaction/keyboardcontroller.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 @@ -54,4 +54,4 @@ protected: } // namespace interaction } // namespace openspace -#endif // __KEYBOARDCONTROLLER_H__ +#endif // __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__ diff --git a/include/openspace/interaction/luaconsole.h b/include/openspace/interaction/luaconsole.h index 13ef84051e..cf863107b3 100644 --- a/include/openspace/interaction/luaconsole.h +++ b/include/openspace/interaction/luaconsole.h @@ -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 #include @@ -83,4 +83,4 @@ private: } // namespace openspace -#endif +#endif // __OPENSPACE_CORE___LUACONSOLE___H__ diff --git a/include/openspace/interaction/mousecontroller.h b/include/openspace/interaction/mousecontroller.h deleted file mode 100644 index 2a47ee73a2..0000000000 --- a/include/openspace/interaction/mousecontroller.h +++ /dev/null @@ -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 - -#include - -#include - -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 diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h index 7f2441699a..5783461813 100644 --- a/include/openspace/mission/mission.h +++ b/include/openspace/mission/mission.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MISSION_H__ -#define __MISSION_H__ +#ifndef __OPENSPACE_CORE___MISSION___H__ +#define __OPENSPACE_CORE___MISSION___H__ #include #include @@ -143,4 +143,4 @@ Mission missionFromFile(std::string filename); } // namespace openspace -#endif // __MISSION_H__ +#endif // __OPENSPACE_CORE___MISSION___H__ diff --git a/include/openspace/mission/missionmanager.h b/include/openspace/mission/missionmanager.h index a25d3df657..56fee42f45 100644 --- a/include/openspace/mission/missionmanager.h +++ b/include/openspace/mission/missionmanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MISSIONMANAGER_H__ -#define __MISSIONMANAGER_H__ +#ifndef __OPENSPACE_CORE___MISSIONMANAGER___H__ +#define __OPENSPACE_CORE___MISSIONMANAGER___H__ #include @@ -96,4 +96,4 @@ private: } // namespace openspace -#endif // __MISSIONMANAGER_H__ +#endif // __OPENSPACE_CORE___MISSIONMANAGER___H__ diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index a5f999f030..8b06233f2c 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MESSAGESTRUCTURES_H__ -#define __MESSAGESTRUCTURES_H__ +#ifndef __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ +#define __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ //std includes #include @@ -164,4 +164,4 @@ struct ScriptMessage { } //namespace messagestructures } // namespace openspace -#endif // __MESSAGESTRUCTURES_H__ +#endif // __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ diff --git a/include/openspace/network/networkengine.h b/include/openspace/network/networkengine.h index 9a4febd7aa..e3f92e3264 100644 --- a/include/openspace/network/networkengine.h +++ b/include/openspace/network/networkengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __NETWORKENGINE_H__ -#define __NETWORKENGINE_H__ +#ifndef __OPENSPACE_CORE___NETWORKENGINE___H__ +#define PARALLELCONNECTION__OPENSPACE_CORE___NETWORKENGINE___H__ #include #include @@ -75,4 +75,4 @@ private: } // namespace openspace -#endif // __NETWORKENGINE_H__ +#endif // __OPENSPACE_CORE___NETWORKENGINE___H__ diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 6b77861e4d..2822b1e398 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PARALLELCONNECTION_H__ -#define __PARALLELCONNECTION_H__ +#ifndef __OPENSPACE_CORE___PARALLELCONNECTION___H__ +#define __OPENSPACE_CORE___PARALLELCONNECTION___H__ //openspace includes #include @@ -200,4 +200,4 @@ private: } // namespace openspace -#endif // __OSPARALLELCONNECTION_H__ +#endif // __OPENSPACE_CORE___PARALLELCONNECTION___H__ diff --git a/include/openspace/openspace.h b/include/openspace/openspace.h index be618923d2..5359b5f360 100644 --- a/include/openspace/openspace.h +++ b/include/openspace/openspace.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_H__ -#define __OPENSPACE_H__ +#ifndef __OPENSPACE_CORE___OPENSPACE___H__ +#define __OPENSPACE_CORE___OPENSPACE___H__ #include @@ -39,4 +39,4 @@ const std::string OPENSPACE_VERSION_STRING = "prerelease-11 (AGU)"; } // namespace openspace -#endif // __OPENSPACE_H__ +#endif // __OPENSPACE_CORE___OPENSPACE___H__ diff --git a/include/openspace/performance/performancelayout.h b/include/openspace/performance/performancelayout.h index aa57208b6f..29feabaca5 100644 --- a/include/openspace/performance/performancelayout.h +++ b/include/openspace/performance/performancelayout.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PERFORMANCELAYOUT_H__ -#define __PERFORMANCELAYOUT_H__ +#ifndef __OPENSPACE_CORE___PERFORMANCELAYOUT___H__ +#define __OPENSPACE_CORE___PERFORMANCELAYOUT___H__ #include @@ -60,4 +60,4 @@ struct PerformanceLayout { } // namespace performance } // namespace openspace -#endif // __PERFORMANCELAYOUT_H__ +#endif // __OPENSPACE_CORE___PERFORMANCELAYOUT___H__ diff --git a/include/openspace/performance/performancemanager.h b/include/openspace/performance/performancemanager.h index 5d54223dab..ebad4f61ff 100644 --- a/include/openspace/performance/performancemanager.h +++ b/include/openspace/performance/performancemanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PERFORMANCEMANAGER_H__ -#define __PERFORMANCEMANAGER_H__ +#ifndef __OPENSPACE_CORE___PERFORMANCEMANAGER___H__ +#define __OPENSPACE_CORE___PERFORMANCEMANAGER___H__ #include @@ -71,4 +71,4 @@ private: } // namespace performance } // namespace openspace -#endif // __PERFORMANCEMANAGER_H__ +#endif // __OPENSPACE_CORE___PERFORMANCEMANAGER___H__ diff --git a/include/openspace/performance/performancemeasurement.h b/include/openspace/performance/performancemeasurement.h index 9bf1395d67..3be224cf1e 100644 --- a/include/openspace/performance/performancemeasurement.h +++ b/include/openspace/performance/performancemeasurement.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PERFORMANCEMEASUREMENT_H__ -#define __PERFORMANCEMEASUREMENT_H__ +#ifndef __OPENSPACE_CORE___PERFORMANCEMEASUREMENT___H__ +#define __OPENSPACE_CORE___PERFORMANCEMEASUREMENT___H__ #include #include @@ -62,4 +62,4 @@ private: } // namespace performance } // namespace openspace -#endif // __PERFORMANCEMEASUREMENTHELPER_H__ +#endif // __OPENSPACE_CORE___PERFORMANCEMEASUREMENT___H__ diff --git a/include/openspace/properties/matrix/dmat2property.h b/include/openspace/properties/matrix/dmat2property.h index 068262e95e..d50900234a 100644 --- a/include/openspace/properties/matrix/dmat2property.h +++ b/include/openspace/properties/matrix/dmat2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT2PROPERTY_H__ -#define __DMAT2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT2PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat2Property, glm::dmat2x2); } // namespace properties } // namespace openspace -#endif // __DMAT2PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat2x3property.h b/include/openspace/properties/matrix/dmat2x3property.h index 93b788a467..c6ec775b38 100644 --- a/include/openspace/properties/matrix/dmat2x3property.h +++ b/include/openspace/properties/matrix/dmat2x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT2x3PROPERTY_H__ -#define __DMAT2x3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT2x3PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT2x3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat2x3Property, glm::dmat2x3); } // namespace properties } // namespace openspace -#endif // __DMAT2x3PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT2x3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat2x4property.h b/include/openspace/properties/matrix/dmat2x4property.h index 6eadff129a..060569bdb9 100644 --- a/include/openspace/properties/matrix/dmat2x4property.h +++ b/include/openspace/properties/matrix/dmat2x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT2x4PROPERTY_H__ -#define __DMAT2x4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT2x4PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT2x4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat2x4Property, glm::dmat2x4); } // namespace properties } // namespace openspace -#endif // __DMAT2x4PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT2x4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat3property.h b/include/openspace/properties/matrix/dmat3property.h index 1ddb7c33e4..c94c94694b 100644 --- a/include/openspace/properties/matrix/dmat3property.h +++ b/include/openspace/properties/matrix/dmat3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT3PROPERTY_H__ -#define __DMAT3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT3PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat3Property, glm::dmat3x3); } // namespace properties } // namespace openspace -#endif // __DMAT3PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat3x2property.h b/include/openspace/properties/matrix/dmat3x2property.h index df77be19bd..e94c0f7f13 100644 --- a/include/openspace/properties/matrix/dmat3x2property.h +++ b/include/openspace/properties/matrix/dmat3x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT3x2PROPERTY_H__ -#define __DMAT3x2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT3x2PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT3x2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat3x2Property, glm::dmat3x2); } // namespace properties } // namespace openspace -#endif // __DMAT3x2PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT3x2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat3x4property.h b/include/openspace/properties/matrix/dmat3x4property.h index 2bd147a1e2..7d6c190766 100644 --- a/include/openspace/properties/matrix/dmat3x4property.h +++ b/include/openspace/properties/matrix/dmat3x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT3x4PROPERTY_H__ -#define __DMAT3x4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT3x4PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT3x4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat3x4Property, glm::dmat3x4); } // namespace properties } // namespace openspace -#endif // __DMAT3x4PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT3x4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat4property.h b/include/openspace/properties/matrix/dmat4property.h index d94a034d59..927587f1eb 100644 --- a/include/openspace/properties/matrix/dmat4property.h +++ b/include/openspace/properties/matrix/dmat4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT4PROPERTY_H__ -#define __DMAT4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT4PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat4Property, glm::dmat4x4); } // namespace properties } // namespace openspace -#endif // __DMAT4PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat4x2property.h b/include/openspace/properties/matrix/dmat4x2property.h index c494207d06..3ab7f82af6 100644 --- a/include/openspace/properties/matrix/dmat4x2property.h +++ b/include/openspace/properties/matrix/dmat4x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT4x2PROPERTY_H__ -#define __DMAT4x2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT4x2PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT4x2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat4x2Property, glm::dmat4x2); } // namespace properties } // namespace openspace -#endif // __DMAT4x2PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT4x2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/dmat4x3property.h b/include/openspace/properties/matrix/dmat4x3property.h index 2445c505a6..013fe01794 100644 --- a/include/openspace/properties/matrix/dmat4x3property.h +++ b/include/openspace/properties/matrix/dmat4x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DMAT4x3PROPERTY_H__ -#define __DMAT4x3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DMAT4x3PROPERTY___H__ +#define __OPENSPACE_CORE___DMAT4x3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DMat4x3Property, glm::dmat4x3); } // namespace properties } // namespace openspace -#endif // __DMAT4x3PROPERTY_H__ +#endif // __OPENSPACE_CORE___DMAT4x3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat2property.h b/include/openspace/properties/matrix/mat2property.h index 9f33108218..f8deb63b3d 100644 --- a/include/openspace/properties/matrix/mat2property.h +++ b/include/openspace/properties/matrix/mat2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT2PROPERTY_H__ -#define __MAT2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT2PROPERTY___H__ +#define __OPENSPACE_CORE___MAT2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat2Property, glm::mat2x2); } // namespace properties } // namespace openspace -#endif // __MAT2PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat2x3property.h b/include/openspace/properties/matrix/mat2x3property.h index 4e7058b19c..822a11d5b5 100644 --- a/include/openspace/properties/matrix/mat2x3property.h +++ b/include/openspace/properties/matrix/mat2x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT2x3PROPERTY_H__ -#define __MAT2x3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT2x3PROPERTY___H__ +#define __OPENSPACE_CORE___MAT2x3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat2x3Property, glm::mat2x3); } // namespace properties } // namespace openspace -#endif // __MAT2x3PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT2x3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat2x4property.h b/include/openspace/properties/matrix/mat2x4property.h index 2c6472ec39..19230ac699 100644 --- a/include/openspace/properties/matrix/mat2x4property.h +++ b/include/openspace/properties/matrix/mat2x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT2x4PROPERTY_H__ -#define __MAT2x4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT2x4PROPERTY___H__ +#define __OPENSPACE_CORE___MAT2x4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat2x4Property, glm::mat2x4); } // namespace properties } // namespace openspace -#endif // __MAT2x4PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT2x4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat3property.h b/include/openspace/properties/matrix/mat3property.h index d722340c78..b9451c2d55 100644 --- a/include/openspace/properties/matrix/mat3property.h +++ b/include/openspace/properties/matrix/mat3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT3PROPERTY_H__ -#define __MAT3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT3PROPERTY___H__ +#define __OPENSPACE_CORE___MAT3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat3Property, glm::mat3x3); } // namespace properties } // namespace openspace -#endif // __MAT3PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT3PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat3x2property.h b/include/openspace/properties/matrix/mat3x2property.h index 880998f3c1..a8caac4361 100644 --- a/include/openspace/properties/matrix/mat3x2property.h +++ b/include/openspace/properties/matrix/mat3x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT3x2PROPERTY_H__ -#define __MAT3x2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT3x2PROPERTY___H__ +#define __OPENSPACE_CORE___MAT3x2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat3x2Property, glm::mat3x2); } // namespace properties } // namespace openspace -#endif // __MAT3x2PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT3x2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat3x4property.h b/include/openspace/properties/matrix/mat3x4property.h index f204e8a612..bf65b1857a 100644 --- a/include/openspace/properties/matrix/mat3x4property.h +++ b/include/openspace/properties/matrix/mat3x4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT3x4PROPERTY_H__ -#define __MAT3x4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT3x4PROPERTY___H__ +#define __OPENSPACE_CORE___MAT3x4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat3x4Property, glm::mat3x4); } // namespace properties } // namespace openspace -#endif // __MAT3x4PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT3x4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat4property.h b/include/openspace/properties/matrix/mat4property.h index 174e653f6e..edbab9cda2 100644 --- a/include/openspace/properties/matrix/mat4property.h +++ b/include/openspace/properties/matrix/mat4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT4PROPERTY_H__ -#define __MAT4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT4PROPERTY___H__ +#define __OPENSPACE_CORE___MAT4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat4Property, glm::mat4x4); } // namespace properties } // namespace openspace -#endif // __MAT4PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT4PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat4x2property.h b/include/openspace/properties/matrix/mat4x2property.h index 1ba992b3c1..19ae107a6c 100644 --- a/include/openspace/properties/matrix/mat4x2property.h +++ b/include/openspace/properties/matrix/mat4x2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT4x2PROPERTY_H__ -#define __MAT4x2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT4x2PROPERTY___H__ +#define __OPENSPACE_CORE___MAT4x2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat4x2Property, glm::mat4x2); } // namespace properties } // namespace openspace -#endif // __MAT4x2PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT4x2PROPERTY___H__ diff --git a/include/openspace/properties/matrix/mat4x3property.h b/include/openspace/properties/matrix/mat4x3property.h index 5c98761f22..17621ab924 100644 --- a/include/openspace/properties/matrix/mat4x3property.h +++ b/include/openspace/properties/matrix/mat4x3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MAT4x3PROPERTY_H__ -#define __MAT4x3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___MAT4x3PROPERTY___H__ +#define __OPENSPACE_CORE___MAT4x3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Mat4x3Property, glm::mat4x3); } // namespace properties } // namespace openspace -#endif // __MAT4x3PROPERTY_H__ +#endif // __OPENSPACE_CORE___MAT4x3PROPERTY___H__ diff --git a/include/openspace/properties/matrixproperty.h b/include/openspace/properties/matrixproperty.h index fdce58f3be..2b26259c11 100644 --- a/include/openspace/properties/matrixproperty.h +++ b/include/openspace/properties/matrixproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __MATRIXPROPERTY_H__ -#define __MATRIXPROPERTY_H__ +#ifndef __OPENSPACE_CORE___MATRIXPROPERTY___H__ +#define __OPENSPACE_CORE___MATRIXPROPERTY___H__ #include @@ -47,4 +47,4 @@ #include #include -#endif // __MATRIXPROPERTY_H__ +#endif // __OPENSPACE_CORE___MATRIXPROPERTY___H__ diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index b386c9d4b7..2a5a5a3c7a 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __NUMERICALPROPERTY_H__ -#define __NUMERICALPROPERTY_H__ +#ifndef __OPENSPACE_CORE___NUMERICALPROPERTY___H__ +#define __OPENSPACE_CORE___NUMERICALPROPERTY___H__ #include @@ -78,4 +78,4 @@ protected: #include "openspace/properties/numericalproperty.inl" -#endif // __NUMERICALPROPERTY_H__ +#endif // __OPENSPACE_CORE___NUMERICALPROPERTY___H__ diff --git a/include/openspace/properties/optionproperty.h b/include/openspace/properties/optionproperty.h index 78c0630c37..4263120deb 100644 --- a/include/openspace/properties/optionproperty.h +++ b/include/openspace/properties/optionproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPTIONPROPERTY_H__ -#define __OPTIONPROPERTY_H__ +#ifndef __OPENSPACE_CORE___OPTIONPROPERTY___H__ +#define __OPENSPACE_CORE___OPTIONPROPERTY___H__ #include @@ -134,4 +134,4 @@ private: } // namespace properties } // namespace openspace -#endif // __STRINGPROPERTY_H__ +#endif // __OPENSPACE_CORE___OPTIONPROPERTY___H__ diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index ec8011bdcb..0baa569612 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PROPERTY_H__ -#define __PROPERTY_H__ +#ifndef __OPENSPACE_CORE___PROPERTY___H__ +#define __OPENSPACE_CORE___PROPERTY___H__ #include @@ -388,4 +388,4 @@ protected: } // namespace properties } // namespace openspace -#endif // __PROPERTY_H__ +#endif // __OPENSPACE_CORE___PROPERTY___H__ diff --git a/include/openspace/properties/propertydelegate.h b/include/openspace/properties/propertydelegate.h index 7ce86e2566..ff63e25fa7 100644 --- a/include/openspace/properties/propertydelegate.h +++ b/include/openspace/properties/propertydelegate.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PROPERTYDELEGATE_H__ -#define __PROPERTYDELEGATE_H__ +#ifndef __OPENSPACE_CORE___PROPERTYDELEGATE___H__ +#define __OPENSPACE_CORE___PROPERTYDELEGATE___H__ #include @@ -163,4 +163,4 @@ public: #include -#endif // __PROPERTYDELEGATE_H__ +#endif // __OPENSPACE_CORE___PROPERTYDELEGATE___H__ diff --git a/include/openspace/properties/propertyowner.h b/include/openspace/properties/propertyowner.h index 1c2de04952..51b26dac96 100644 --- a/include/openspace/properties/propertyowner.h +++ b/include/openspace/properties/propertyowner.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PROPERTYOWNER_H__ -#define __PROPERTYOWNER_H__ +#ifndef __OPENSPACE_CORE___PROPERTYOWNER___H__ +#define __OPENSPACE_CORE___PROPERTYOWNER___H__ #include #include @@ -222,4 +222,4 @@ private: } // namespace properties } // namespace openspace -#endif // __PROPERTYOWNER_H__ +#endif // __OPENSPACE_CORE___PROPERTYOWNER___H__ diff --git a/include/openspace/properties/scalar/boolproperty.h b/include/openspace/properties/scalar/boolproperty.h index e3766ccce0..e615368b1c 100644 --- a/include/openspace/properties/scalar/boolproperty.h +++ b/include/openspace/properties/scalar/boolproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __BOOLPROPERTY_H__ -#define __BOOLPROPERTY_H__ +#ifndef __OPENSPACE_CORE___BOOLPROPERTY___H__ +#define __OPENSPACE_CORE___BOOLPROPERTY___H__ /** * \file boolproperty.h @@ -50,4 +50,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(BoolProperty, bool); } // namespace properties } // namespace openspace -#endif // __BOOLPROPERTY_H__ +#endif // __OPENSPACE_CORE___BOOLPROPERTY___H__ diff --git a/include/openspace/properties/scalar/charproperty.h b/include/openspace/properties/scalar/charproperty.h index bf8c4037c6..3357d47c7e 100644 --- a/include/openspace/properties/scalar/charproperty.h +++ b/include/openspace/properties/scalar/charproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __CHARPROPERTY_H__ -#define __CHARPROPERTY_H__ +#ifndef __OPENSPACE_CORE___CHARPROPERTY___H__ +#define __OPENSPACE_CORE___CHARPROPERTY___H__ /** * \file charproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(CharProperty, char); } // namespace properties } // namespace openspace -#endif // __CHARPROPERTY_H__ +#endif // __OPENSPACE_CORE___CHARPROPERTY___H__ diff --git a/include/openspace/properties/scalar/doubleproperty.h b/include/openspace/properties/scalar/doubleproperty.h index 244612cc38..f47abe8b85 100644 --- a/include/openspace/properties/scalar/doubleproperty.h +++ b/include/openspace/properties/scalar/doubleproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DOUBLEPROPERTY_H__ -#define __DOUBLEPROPERTY_H__ +#ifndef __OPENSPACE_CORE___DOUBLEPROPERTY___H__ +#define __OPENSPACE_CORE___DOUBLEPROPERTY___H__ /** * \file doubleproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DoubleProperty, double); } // namespace properties } // namespace openspace -#endif // __DOUBLEPROPERTY_H__ +#endif // __OPENSPACE_CORE___DOUBLEPROPERTY___H__ diff --git a/include/openspace/properties/scalar/floatproperty.h b/include/openspace/properties/scalar/floatproperty.h index 5a72f238eb..11acdebbb4 100644 --- a/include/openspace/properties/scalar/floatproperty.h +++ b/include/openspace/properties/scalar/floatproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __FLOATPROPERTY_H__ -#define __FLOATPROPERTY_H__ +#ifndef __OPENSPACE_CORE___FLOATPROPERTY___H__ +#define __OPENSPACE_CORE___FLOATPROPERTY___H__ /** * \file floatproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(FloatProperty, float); } // namespace properties } // namespace openspace -#endif // __FLOATPROPERTY_H__ +#endif // __OPENSPACE_CORE___FLOATPROPERTY___H__ diff --git a/include/openspace/properties/scalar/intproperty.h b/include/openspace/properties/scalar/intproperty.h index 83317d89d4..3aa9f82b62 100644 --- a/include/openspace/properties/scalar/intproperty.h +++ b/include/openspace/properties/scalar/intproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __INTPROPERTY_H__ -#define __INTPROPERTY_H__ +#ifndef __OPENSPACE_CORE___INTPROPERTY___H__ +#define __OPENSPACE_CORE___INTPROPERTY___H__ /** * \file intproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(IntProperty, int); } // namespace properties } // namespace openspace -#endif // __INTPROPERTY_H__ +#endif // __OPENSPACE_CORE___INTPROPERTY___H__ diff --git a/include/openspace/properties/scalar/longdoubleproperty.h b/include/openspace/properties/scalar/longdoubleproperty.h index 74c154caa3..40358f602b 100644 --- a/include/openspace/properties/scalar/longdoubleproperty.h +++ b/include/openspace/properties/scalar/longdoubleproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __LONGDOUBLEPROPERTY_H__ -#define __LONGDOUBLEPROPERTY_H__ +#ifndef __OPENSPACE_CORE___LONGDOUBLEPROPERTY___H__ +#define __OPENSPACE_CORE___LONGDOUBLEPROPERTY___H__ /** * \file longdoubleproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(LongDoubleProperty, long double); } // namespace properties } // namespace openspace -#endif // __LONGDOUBLEPROPERTY_H__ +#endif // __OPENSPACE_CORE___LONGDOUBLEPROPERTY___H__ diff --git a/include/openspace/properties/scalar/longlongproperty.h b/include/openspace/properties/scalar/longlongproperty.h index f9544ee2b3..65e176e09d 100644 --- a/include/openspace/properties/scalar/longlongproperty.h +++ b/include/openspace/properties/scalar/longlongproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __LONGLONGPROPERTY_H__ -#define __LONGLONGPROPERTY_H__ +#ifndef __OPENSPACE_CORE___LONGLONGPROPERTY___H__ +#define __OPENSPACE_CORE___LONGLONGPROPERTY___H__ /** * \file longlongproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(LongLongProperty, long long); } // namespace properties } // namespace openspace -#endif // __LONGLONGPROPERTY_H__ +#endif // __OPENSPACE_CORE___LONGLONGPROPERTY___H__ diff --git a/include/openspace/properties/scalar/longproperty.h b/include/openspace/properties/scalar/longproperty.h index 5a8b8a273c..444fc6c15a 100644 --- a/include/openspace/properties/scalar/longproperty.h +++ b/include/openspace/properties/scalar/longproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __LONGPROPERTY_H__ -#define __LONGPROPERTY_H__ +#ifndef __OPENSPACE_CORE___LONGPROPERTY___H__ +#define __OPENSPACE_CORE___LONGPROPERTY___H__ /** * \file longproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(LongProperty, long); } // namespace properties } // namespace openspace -#endif // __LONGPROPERTY_H__ +#endif // __OPENSPACE_CORE___LONGPROPERTY___H__ diff --git a/include/openspace/properties/scalar/shortproperty.h b/include/openspace/properties/scalar/shortproperty.h index 8f862e9f13..da37c72a60 100644 --- a/include/openspace/properties/scalar/shortproperty.h +++ b/include/openspace/properties/scalar/shortproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SHORTPROPERTY_H__ -#define __SHORTPROPERTY_H__ +#ifndef __OPENSPACE_CORE___SHORTPROPERTY___H__ +#define __OPENSPACE_CORE___SHORTPROPERTY___H__ /** * \file shortproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(ShortProperty, short); } // namespace properties } // namespace openspace -#endif // __SHORTPROPERTY_H__ +#endif // __OPENSPACE_CORE___SHORTPROPERTY___H__ diff --git a/include/openspace/properties/scalar/signedcharproperty.h b/include/openspace/properties/scalar/signedcharproperty.h index c3aacd600f..2ff7ff0d03 100644 --- a/include/openspace/properties/scalar/signedcharproperty.h +++ b/include/openspace/properties/scalar/signedcharproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SIGNEDCHARPROPERTY_H__ -#define __SIGNEDCHARPROPERTY_H__ +#ifndef __OPENSPACE_CORE___SIGNEDCHARPROPERTY___H__ +#define __OPENSPACE_CORE___SIGNEDCHARPROPERTY___H__ /** * \file signedcharproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(SignedCharProperty, signed char); } // namespace properties } // namespace openspace -#endif // __SIGNEDCHARPROPERTY_H__ +#endif // __OPENSPACE_CORE___SIGNEDCHARPROPERTY___H__ diff --git a/include/openspace/properties/scalar/ucharproperty.h b/include/openspace/properties/scalar/ucharproperty.h index c22e4abeec..c91b5051b5 100644 --- a/include/openspace/properties/scalar/ucharproperty.h +++ b/include/openspace/properties/scalar/ucharproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __UCHARPROPERTY_H__ -#define __UCHARPROPERTY_H__ +#ifndef __OPENSPACE_CORE___UCHARPROPERTY___H__ +#define __OPENSPACE_CORE___UCHARPROPERTY___H__ /** * \file ucharproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(UCharProperty, unsigned char); } // namespace properties } // namespace openspace -#endif // __UCHARPROPERTY_H__ +#endif // __OPENSPACE_CORE___UCHARPROPERTY___H__ diff --git a/include/openspace/properties/scalar/uintproperty.h b/include/openspace/properties/scalar/uintproperty.h index 4aa70035d0..bf83adc31f 100644 --- a/include/openspace/properties/scalar/uintproperty.h +++ b/include/openspace/properties/scalar/uintproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __UINTPROPERTY_H__ -#define __UINTPROPERTY_H__ +#ifndef __OPENSPACE_CORE___UINTPROPERTY___H__ +#define __OPENSPACE_CORE___UINTPROPERTY___H__ /** * \file uintproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(UIntProperty, unsigned int); } // namespace properties } // namespace openspace -#endif // __UINTPROPERTY_H__ +#endif // __OPENSPACE_CORE___UINTPROPERTY___H__ diff --git a/include/openspace/properties/scalar/ulonglongproperty.h b/include/openspace/properties/scalar/ulonglongproperty.h index 7fd7c7f980..045da7a9b9 100644 --- a/include/openspace/properties/scalar/ulonglongproperty.h +++ b/include/openspace/properties/scalar/ulonglongproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __ULONGLONGPROPERTY_H__ -#define __ULONGLONGPROPERTY_H__ +#ifndef __OPENSPACE_CORE___ULONGLONGPROPERTY___H__ +#define __OPENSPACE_CORE___ULONGLONGPROPERTY___H__ /** * \file ulonglongproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(ULongLongProperty, unsigned long long); } // namespace properties } // namespace openspace -#endif // __ULONGLONGPROPERTY_H__ +#endif // __OPENSPACE_CORE___ULONGLONGPROPERTY___H__ diff --git a/include/openspace/properties/scalar/ulongproperty.h b/include/openspace/properties/scalar/ulongproperty.h index a346551618..4350c0ae46 100644 --- a/include/openspace/properties/scalar/ulongproperty.h +++ b/include/openspace/properties/scalar/ulongproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __ULONGPROPERTY_H__ -#define __ULONGPROPERTY_H__ +#ifndef __OPENSPACE_CORE___ULONGPROPERTY___H__ +#define __OPENSPACE_CORE___ULONGPROPERTY___H__ /** * \file ulongproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(ULongProperty, unsigned long); } // namespace properties } // namespace openspace -#endif // __ULONGPROPERTY_H__ +#endif // __OPENSPACE_CORE___ULONGPROPERTY___H__ diff --git a/include/openspace/properties/scalar/ushortproperty.h b/include/openspace/properties/scalar/ushortproperty.h index 8e9b7ea882..9c2d20320d 100644 --- a/include/openspace/properties/scalar/ushortproperty.h +++ b/include/openspace/properties/scalar/ushortproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __USHORTPROPERTY_H__ -#define __USHORTPROPERTY_H__ +#ifndef __OPENSPACE_CORE___USHORTPROPERTY___H__ +#define __OPENSPACE_CORE___USHORTPROPERTY___H__ /** * \file ushortproperty.h @@ -50,4 +50,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(UShortProperty, unsigned short); } // namespace properties } // namespace openspace -#endif // __USHORTPROPERTY_H__ +#endif // __OPENSPACE_CORE___USHORTPROPERTY___H__ diff --git a/include/openspace/properties/scalar/wcharproperty.h b/include/openspace/properties/scalar/wcharproperty.h index f6b91d4766..d19a460884 100644 --- a/include/openspace/properties/scalar/wcharproperty.h +++ b/include/openspace/properties/scalar/wcharproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __WCHARPROPERTY_H__ -#define __WCHARPROPERTY_H__ +#ifndef __OPENSPACE_CORE___WCHARPROPERTY___H__ +#define __OPENSPACE_CORE___WCHARPROPERTY___H__ /** * \file wcharproperty.h @@ -50,4 +50,4 @@ namespace properties { } // namespace properties } // namespace openspace -#endif // __WCHARPROPERTY_H__ +#endif // __OPENSPACE_CORE___WCHARPROPERTY___H__ diff --git a/include/openspace/properties/scalarproperty.h b/include/openspace/properties/scalarproperty.h index 8127b83077..16c620c3e9 100644 --- a/include/openspace/properties/scalarproperty.h +++ b/include/openspace/properties/scalarproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCALARPROPERTY_H__ -#define __SCALARPROPERTY_H__ +#ifndef __OPENSPACE_CORE___SCALARPROPERTY___H__ +#define __OPENSPACE_CORE___SCALARPROPERTY___H__ #include @@ -44,4 +44,4 @@ #include #include -#endif // __SCALARPROPERTY_H__ +#endif // __OPENSPACE_CORE___SCALARPROPERTY___H__ diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index 3eefe59b31..39dc560508 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SELECTIONPROPERTY_H__ -#define __SELECTIONPROPERTY_H__ +#ifndef __OPENSPACE_CORE___SELECTIONPROPERTY___H__ +#define __OPENSPACE_CORE___SELECTIONPROPERTY___H__ #include @@ -80,4 +80,4 @@ bool PropertyDelegate>>::toString(std::string& } // namespace properties } // namespace openspace -#endif // __SELECTIONPROPERTY_H__ +#endif // __OPENSPACE_CORE___SELECTIONPROPERTY___H__ diff --git a/include/openspace/properties/stringproperty.h b/include/openspace/properties/stringproperty.h index eb01a2dc07..d6840cd016 100644 --- a/include/openspace/properties/stringproperty.h +++ b/include/openspace/properties/stringproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __STRINGPROPERTY_H__ -#define __STRINGPROPERTY_H__ +#ifndef __OPENSPACE_CORE___STRINGPROPERTY___H__ +#define __OPENSPACE_CORE___STRINGPROPERTY___H__ #include @@ -35,4 +35,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(StringProperty, std::string); } // namespace properties } // namespace openspace -#endif // __STRINGPROPERTY_H__ +#endif // __OPENSPACE_CORE___STRINGPROPERTY___H__ diff --git a/include/openspace/properties/templateproperty.h b/include/openspace/properties/templateproperty.h index efc8423e28..a562b59020 100644 --- a/include/openspace/properties/templateproperty.h +++ b/include/openspace/properties/templateproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TEMPLATEPROPERTY_H__ -#define __TEMPLATEPROPERTY_H__ +#ifndef __OPENSPACE_CORE___TEMPLATEPROPERTY___H__ +#define __OPENSPACE_CORE___TEMPLATEPROPERTY___H__ #include @@ -191,4 +191,4 @@ protected: #include "openspace/properties/templateproperty.inl" -#endif // __TEMPLATEPROPERTY_H__ +#endif // __OPENSPACE_CORE___TEMPLATEPROPERTY___H__ diff --git a/include/openspace/properties/triggerproperty.h b/include/openspace/properties/triggerproperty.h index f7f1aa4594..c6bcf6c9e9 100644 --- a/include/openspace/properties/triggerproperty.h +++ b/include/openspace/properties/triggerproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TRIGGERPROPERTY_H__ -#define __TRIGGERPROPERTY_H__ +#ifndef __OPENSPACE_CORE___TRIGGERPROPERTY___H__ +#define __OPENSPACE_CORE___TRIGGERPROPERTY___H__ #include @@ -70,4 +70,4 @@ public: } // namespace properties } // namespace openspace -#endif // __TRIGGERPROPERTY_H__ +#endif // __OPENSPACE_CORE___TRIGGERPROPERTY___H__ diff --git a/include/openspace/properties/vector/bvec2property.h b/include/openspace/properties/vector/bvec2property.h index ba2c6f607e..79d94c97e8 100644 --- a/include/openspace/properties/vector/bvec2property.h +++ b/include/openspace/properties/vector/bvec2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __BVEC2PROPERTY_H__ -#define __BVEC2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___BVEC2PROPERTY___H__ +#define __OPENSPACE_CORE___BVEC2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(BVec2Property, glm::bvec2); } // namespace properties } // namespace openspace -#endif // __BVEC2PROPERTY_H__ +#endif // __OPENSPACE_CORE___BVEC2PROPERTY___H__ diff --git a/include/openspace/properties/vector/bvec3property.h b/include/openspace/properties/vector/bvec3property.h index 482b573871..4dbfc678b0 100644 --- a/include/openspace/properties/vector/bvec3property.h +++ b/include/openspace/properties/vector/bvec3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __BVEC3PROPERTY_H__ -#define __BVEC3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___BVEC3PROPERTY___H__ +#define __OPENSPACE_CORE___BVEC3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(BVec3Property, glm::bvec3); } // namespace properties } // namespace openspace -#endif // __BVEC3PROPERTY_H__ +#endif // __OPENSPACE_CORE___BVEC3PROPERTY___H__ diff --git a/include/openspace/properties/vector/bvec4property.h b/include/openspace/properties/vector/bvec4property.h index 971e323d95..9912c72506 100644 --- a/include/openspace/properties/vector/bvec4property.h +++ b/include/openspace/properties/vector/bvec4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __BVEC4PROPERTY_H__ -#define __BVEC4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___BVEC4PROPERTY___H__ +#define __OPENSPACE_CORE___BVEC4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(BVec4Property, glm::bvec4); } // namespace properties } // namespace openspace -#endif // __BVEC4PROPERTY_H__ +#endif // __OPENSPACE_CORE___BVEC4PROPERTY___H__ diff --git a/include/openspace/properties/vector/dvec2property.h b/include/openspace/properties/vector/dvec2property.h index eb42825526..2ad7df993f 100644 --- a/include/openspace/properties/vector/dvec2property.h +++ b/include/openspace/properties/vector/dvec2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DVEC2PROPERTY_H__ -#define __DVEC2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DVEC2PROPERTY___H__ +#define __OPENSPACE_CORE___DVEC2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DVec2Property, glm::dvec2); } // namespace properties } // namespace openspace -#endif // __DVEC2PROPERTY_H__ +#endif // __OPENSPACE_CORE___DVEC2PROPERTY___H__ diff --git a/include/openspace/properties/vector/dvec3property.h b/include/openspace/properties/vector/dvec3property.h index 01d9c1a51a..57463d6c41 100644 --- a/include/openspace/properties/vector/dvec3property.h +++ b/include/openspace/properties/vector/dvec3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DVEC3PROPERTY_H__ -#define __DVEC3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DVEC3PROPERTY___H__ +#define __OPENSPACE_CORE___DVEC3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DVec3Property, glm::dvec3); } // namespace properties } // namespace openspace -#endif // __DVEC3PROPERTY_H__ +#endif // __OPENSPACE_CORE___DVEC3PROPERTY___H__ diff --git a/include/openspace/properties/vector/dvec4property.h b/include/openspace/properties/vector/dvec4property.h index 21ec5ef4bc..eae10fe920 100644 --- a/include/openspace/properties/vector/dvec4property.h +++ b/include/openspace/properties/vector/dvec4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __DVEC4PROPERTY_H__ -#define __DVEC4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___DVEC4PROPERTY___H__ +#define __OPENSPACE_CORE___DVEC4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(DVec4Property, glm::dvec4); } // namespace properties } // namespace openspace -#endif // __DVEC4PROPERTY_H__ +#endif // __OPENSPACE_CORE___DVEC4PROPERTY___H__ diff --git a/include/openspace/properties/vector/ivec2property.h b/include/openspace/properties/vector/ivec2property.h index b0b1864127..3c70c7a915 100644 --- a/include/openspace/properties/vector/ivec2property.h +++ b/include/openspace/properties/vector/ivec2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __IVEC2PROPERTY_H__ -#define __IVEC2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___IVEC2PROPERTY___H__ +#define __OPENSPACE_CORE___IVEC2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(IVec2Property, glm::ivec2); } // namespace properties } // namespace openspace -#endif // __IVEC2PROPERTY_H__ +#endif // __OPENSPACE_CORE___IVEC2PROPERTY___H__ diff --git a/include/openspace/properties/vector/ivec3property.h b/include/openspace/properties/vector/ivec3property.h index 423c807de9..f1a61401c9 100644 --- a/include/openspace/properties/vector/ivec3property.h +++ b/include/openspace/properties/vector/ivec3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __IVEC3PROPERTY_H__ -#define __IVEC3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___IVEC3PROPERTY___H__ +#define __OPENSPACE_CORE___IVEC3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(IVec3Property, glm::ivec3); } // namespace properties } // namespace openspace -#endif // __IVEC3PROPERTY_H__ +#endif // __OPENSPACE_CORE___IVEC3PROPERTY___H__ diff --git a/include/openspace/properties/vector/ivec4property.h b/include/openspace/properties/vector/ivec4property.h index 8d23b78d56..c4baa75d08 100644 --- a/include/openspace/properties/vector/ivec4property.h +++ b/include/openspace/properties/vector/ivec4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __IVEC4PROPERTY_H__ -#define __IVEC4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___IVEC4PROPERTY___H__ +#define __OPENSPACE_CORE___IVEC4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(IVec4Property, glm::ivec4); } // namespace properties } // namespace openspace -#endif // __IVEC4PROPERTY_H__ +#endif // __OPENSPACE_CORE___IVEC4PROPERTY___H__ diff --git a/include/openspace/properties/vector/uvec2property.h b/include/openspace/properties/vector/uvec2property.h index 1d3ea09f92..48a2629432 100644 --- a/include/openspace/properties/vector/uvec2property.h +++ b/include/openspace/properties/vector/uvec2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __UVEC2PROPERTY_H__ -#define __UVEC2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___UVEC2PROPERTY___H__ +#define __OPENSPACE_CORE___UVEC2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(UVec2Property, glm::uvec2); } // namespace properties } // namespace openspace -#endif // __UVEC2PROPERTY_H__ +#endif // __OPENSPACE_CORE___UVEC2PROPERTY___H__ diff --git a/include/openspace/properties/vector/uvec3property.h b/include/openspace/properties/vector/uvec3property.h index c189e7e2b6..defc195ec1 100644 --- a/include/openspace/properties/vector/uvec3property.h +++ b/include/openspace/properties/vector/uvec3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __UVEC3PROPERTY_H__ -#define __UVEC3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___UVEC3PROPERTY___H__ +#define __OPENSPACE_CORE___UVEC3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(UVec3Property, glm::uvec3); } // namespace properties } // namespace openspace -#endif // __UVEC3PROPERTY_H__ +#endif // __OPENSPACE_CORE___UVEC3PROPERTY___H__ diff --git a/include/openspace/properties/vector/uvec4property.h b/include/openspace/properties/vector/uvec4property.h index 24a77157c1..e750f00e6a 100644 --- a/include/openspace/properties/vector/uvec4property.h +++ b/include/openspace/properties/vector/uvec4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __UVEC4PROPERTY_H__ -#define __UVEC4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___UVEC4PROPERTY___H__ +#define __OPENSPACE_CORE___UVEC4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(UVec4Property, glm::uvec4); } // namespace properties } // namespace openspace -#endif // __UVEC4PROPERTY_H__ +#endif // __OPENSPACE_CORE___UVEC4PROPERTY___H__ diff --git a/include/openspace/properties/vector/vec2property.h b/include/openspace/properties/vector/vec2property.h index 40a112abfa..ad26b1e9c4 100644 --- a/include/openspace/properties/vector/vec2property.h +++ b/include/openspace/properties/vector/vec2property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VEC2PROPERTY_H__ -#define __VEC2PROPERTY_H__ +#ifndef __OPENSPACE_CORE___VEC2PROPERTY___H__ +#define __OPENSPACE_CORE___VEC2PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Vec2Property, glm::vec2); } // namespace properties } // namespace openspace -#endif // __VEC2PROPERTY_H__ +#endif // __OPENSPACE_CORE___VEC2PROPERTY___H__ diff --git a/include/openspace/properties/vector/vec3property.h b/include/openspace/properties/vector/vec3property.h index 11416f467b..0daceaad4a 100644 --- a/include/openspace/properties/vector/vec3property.h +++ b/include/openspace/properties/vector/vec3property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VEC3PROPERTY_H__ -#define __VEC3PROPERTY_H__ +#ifndef __OPENSPACE_CORE___VEC3PROPERTY___H__ +#define __OPENSPACE_CORE___VEC3PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Vec3Property, glm::vec3); } // namespace properties } // namespace openspace -#endif // __VEC3PROPERTY_H__ +#endif // __OPENSPACE_CORE___VEC3PROPERTY___H__ diff --git a/include/openspace/properties/vector/vec4property.h b/include/openspace/properties/vector/vec4property.h index 0ee753b33b..ae019c0e22 100644 --- a/include/openspace/properties/vector/vec4property.h +++ b/include/openspace/properties/vector/vec4property.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VEC4PROPERTY_H__ -#define __VEC4PROPERTY_H__ +#ifndef __OPENSPACE_CORE___VEC4PROPERTY___H__ +#define __OPENSPACE_CORE___VEC4PROPERTY___H__ #include @@ -37,4 +37,4 @@ REGISTER_NUMERICALPROPERTY_HEADER(Vec4Property, glm::vec4); } // namespace properties } // namespace openspace -#endif // __VEC4PROPERTY_H__ +#endif // __OPENSPACE_CORE___VEC4PROPERTY___H__ diff --git a/include/openspace/properties/vectorproperty.h b/include/openspace/properties/vectorproperty.h index 6c13d195d5..d7792f1915 100644 --- a/include/openspace/properties/vectorproperty.h +++ b/include/openspace/properties/vectorproperty.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VECTORPROPERTY_H__ -#define __VECTORPROPERTY_H__ +#ifndef __OPENSPACE_CORE___VECTORPROPERTY___H__ +#define __OPENSPACE_CORE___VECTORPROPERTY___H__ #include @@ -47,4 +47,4 @@ #include #include -#endif // __INTPROPERTY_H__ +#endif // __OPENSPACE_CORE___VECTORPROPERTY___H__ diff --git a/include/openspace/query/query.h b/include/openspace/query/query.h index 98d2844f68..8941b8823e 100644 --- a/include/openspace/query/query.h +++ b/include/openspace/query/query.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __QUERY_H__ -#define __QUERY_H__ +#ifndef __OPENSPACE_CORE___QUERY___H__ +#define __OPENSPACE_CORE___QUERY___H__ #include #include @@ -46,6 +46,6 @@ Renderable* renderable(const std::string& name); properties::Property* property(const std::string& uri); std::vector allProperties(); -} // namespace +} // namespace openspace -#endif // __QUERY_H__ +#endif // __OPENSPACE_CORE___QUERY___H__ diff --git a/include/openspace/rendering/abufferrenderer.h b/include/openspace/rendering/abufferrenderer.h index 8a8dd5dba6..4d3972d38e 100644 --- a/include/openspace/rendering/abufferrenderer.h +++ b/include/openspace/rendering/abufferrenderer.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __ABUFFERRENDERER_H__ -#define __ABUFFERRENDERER_H__ +#ifndef __OPENSPACE_CORE___ABUFFERRENDERER___H__ +#define __OPENSPACE_CORE___ABUFFERRENDERER___H__ #include #include @@ -136,7 +136,8 @@ private: float _blackoutFactor; ghoul::Dictionary _rendererData; -}; // ABufferRenderer -} // openspace +}; -#endif // __RENDERER_H__ +} // namespace openspace + +#endif // __OPENSPACE_CORE___ABUFFERRENDERER___H__ diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index df996e695f..9ec20629d2 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __FRAMEBUFFERRENDERER_H__ -#define __FRAMEBUFFERRENDERER_H__ +#ifndef __OPENSPACE_CORE___FRAMEBUFFERRENDERER___H__ +#define __OPENSPACE_CORE___FRAMEBUFFERRENDERER___H__ #include #include @@ -107,7 +107,8 @@ private: int _nAaSamples; ghoul::Dictionary _rendererData; -}; // FramebufferRenderer -} // openspace +}; -#endif // __FRAMEBUFFERRENDERER_H__ +} // namespace openspace + +#endif // __OPENSPACE_CORE___FRAMEBUFFERRENDERER___H__ diff --git a/include/openspace/rendering/raycasterlistener.h b/include/openspace/rendering/raycasterlistener.h index 97a88b2d33..9c5b2df027 100644 --- a/include/openspace/rendering/raycasterlistener.h +++ b/include/openspace/rendering/raycasterlistener.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __RAYCASTERLISTENER_H__ -#define __RAYCASTERLISTENER_H__ +#ifndef __OPENSPACE_CORE___RAYCASTERLISTENER___H__ +#define __OPENSPACE_CORE___RAYCASTERLISTENER___H__ namespace openspace { @@ -36,4 +36,4 @@ public: } // openspace -#endif // __RAYCASTERLISTENER_H__ +#endif // __OPENSPACE_CORE___RAYCASTERLISTENER___H__ diff --git a/include/openspace/rendering/raycastermanager.h b/include/openspace/rendering/raycastermanager.h index 18e2e7f35f..8108ab756a 100644 --- a/include/openspace/rendering/raycastermanager.h +++ b/include/openspace/rendering/raycastermanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __RAYCASTERMANAGER_H__ -#define __RAYCASTERMANAGER_H__ +#ifndef __OPENSPACE_CORE___RAYCASTERMANAGER___H__ +#define __OPENSPACE_CORE___RAYCASTERMANAGER___H__ #include @@ -46,8 +46,8 @@ public: private: std::vector _raycasters; std::vector _listeners; -}; // Volume +}; -} // openspace +} // namespace openspace -#endif // __RAYCASTERMANAGER_H__ +#endif // __OPENSPACE_CORE___RAYCASTERMANAGER___H__ diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 4ecd81f97a..14fd53eb3a 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __RENDERABLE_H__ -#define __RENDERABLE_H__ +#ifndef __OPENSPACE_CORE___RENDERABLE___H__ +#define __OPENSPACE_CORE___RENDERABLE___H__ #include @@ -107,6 +107,6 @@ private: bool _hasTimeInterval; }; -} // namespace openspace +} // namespace openspace -#endif // __RENDERABLE_H__ +#endif // __OPENSPACE_CORE___RENDERABLE___H__ diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 6ec9765c4b..3041507935 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __RENDERENGINE_H__ -#define __RENDERENGINE_H__ +#ifndef __OPENSPACE_CORE___RENDERENGINE___H__ +#define __OPENSPACE_CORE___RENDERENGINE___H__ #include @@ -243,4 +243,4 @@ private: } // namespace openspace -#endif // __RENDERENGINE_H__ +#endif // __OPENSPACE_CORE___RENDERENGINE___H__ diff --git a/include/openspace/rendering/renderer.h b/include/openspace/rendering/renderer.h index 3258be73c0..a09a433497 100644 --- a/include/openspace/rendering/renderer.h +++ b/include/openspace/rendering/renderer.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __RENDERER_H__ -#define __RENDERER_H__ +#ifndef __OPENSPACE_CORE___RENDERER___H__ +#define __OPENSPACE_CORE___RENDERER___H__ #include #include @@ -79,7 +79,8 @@ public: */ virtual void updateRendererData() = 0; -}; // Renderer -} // openspace +}; -#endif // __RENDERER_H__ +} // openspace + +#endif // __OPENSPACE_CORE___RENDERER___H__ diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index adc6633787..aaebcb64b3 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCREENSPACERENDERABLE_H__ -#define __SCREENSPACERENDERABLE_H__ +#ifndef __OPENSPACE_CORE___SCREENSPACERENDERABLE___H__ +#define __OPENSPACE_CORE___SCREENSPACERENDERABLE___H__ #include @@ -114,6 +114,6 @@ protected: float _radius; }; -} // namespace openspace +} // namespace openspace -#endif // __SCREENSPACERENDERABLE_H__ +#endif // __OPENSPACE_CORE___SCREENSPACERENDERABLE___H__ diff --git a/include/openspace/rendering/transferfunction.h b/include/openspace/rendering/transferfunction.h index 71023b00d5..1bccef366e 100644 --- a/include/openspace/rendering/transferfunction.h +++ b/include/openspace/rendering/transferfunction.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2015 * + * 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 * @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TRANSFERFUNCTION_H__ -#define __TRANSFERFUNCTION_H__ +#ifndef __OPENSPACE_CORE___TRANSFERFUNCTION___H__ +#define __OPENSPACE_CORE___TRANSFERFUNCTION___H__ #include #include @@ -34,38 +34,38 @@ namespace openspace { - class TransferFunction { - public: - typedef std::function TfChangedCallback; +class TransferFunction { +public: + typedef std::function TfChangedCallback; - TransferFunction(const std::string& filepath, TfChangedCallback tfChangedCallback = TfChangedCallback()); - void setPath(const std::string& filepath); - ghoul::opengl::Texture& getTexture(); - void bind(); - void update(); - glm::vec4 sample(size_t t); - size_t width(); - void setCallback(TfChangedCallback callback); - private: - void setTextureFromTxt(); - void setTextureFromImage(); - void uploadTexture(); + TransferFunction(const std::string& filepath, TfChangedCallback tfChangedCallback = TfChangedCallback()); + void setPath(const std::string& filepath); + ghoul::opengl::Texture& getTexture(); + void bind(); + void update(); + glm::vec4 sample(size_t t); + size_t width(); + void setCallback(TfChangedCallback callback); +private: + void setTextureFromTxt(); + void setTextureFromImage(); + void uploadTexture(); - std::string _filepath; - std::unique_ptr _file = nullptr; - std::unique_ptr _texture = nullptr; - bool _needsUpdate = false; - TfChangedCallback _tfChangedCallback; - }; + std::string _filepath; + std::unique_ptr _file = nullptr; + std::unique_ptr _texture = nullptr; + bool _needsUpdate = false; + TfChangedCallback _tfChangedCallback; +}; + +struct MappingKey { + float position{0.0f}; + glm::vec4 color{0.0f,0.0f,0.0f,0.0f}; + MappingKey(float p, const glm::vec4& c): position(p), color(c) {}; + MappingKey(float p): position(p), color(glm::vec4(0.0f)) {}; + bool operator<(const MappingKey& rhs) {return position < rhs.position;}; +}; - struct MappingKey { - float position{0.0f}; - glm::vec4 color{0.0f,0.0f,0.0f,0.0f}; - MappingKey(float p, const glm::vec4& c): position(p), color(c) {}; - MappingKey(float p): position(p), color(glm::vec4(0.0f)) {}; - bool operator<(const MappingKey& rhs) {return position < rhs.position;}; - }; } // namespace openspace -#endif - +#endif // __OPENSPACE_CORE___TRANSFERFUNCTION___H__ diff --git a/include/openspace/rendering/volume.h b/include/openspace/rendering/volume.h index 4111705bea..0a01f23c34 100644 --- a/include/openspace/rendering/volume.h +++ b/include/openspace/rendering/volume.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VOLUME_H__ -#define __VOLUME_H__ +#ifndef __OPENSPACE_CORE___VOLUME___H__ +#define __OPENSPACE_CORE___VOLUME___H__ #include #include @@ -125,8 +125,8 @@ public: */ //virtual std::string getHelperPath() = 0; -}; // Volume +}; -} // openspace +} // namespace openspace -#endif // __VOLUME_H__ +#endif // __OPENSPACE_CORE___VOLUME___H__ diff --git a/include/openspace/rendering/volumeraycaster.h b/include/openspace/rendering/volumeraycaster.h index dc4bbcee57..652d906e6e 100644 --- a/include/openspace/rendering/volumeraycaster.h +++ b/include/openspace/rendering/volumeraycaster.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __VOLUMERAYCASTER_H__ -#define __VOLUMERAYCASTER_H__ +#ifndef __OPENSPACE_CORE___VOLUMERAYCASTER___H__ +#define __OPENSPACE_CORE___VOLUMERAYCASTER___H__ #include #include @@ -122,9 +122,8 @@ public: * which should be a prefix to all symbols defined by the helper */ virtual std::string getHelperPath() const = 0; +}; -}; // Raycaster +} // namespace openspace -} // openspace - -#endif // __VOLUMERAYCASTER_H__ +#endif // __OPENSPACE_CORE___VOLUMERAYCASTER___H__ diff --git a/include/openspace/scene/rotation.h b/include/openspace/scene/rotation.h index 0bcb1b0df2..d831046280 100644 --- a/include/openspace/scene/rotation.h +++ b/include/openspace/scene/rotation.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __ROTATION_H__ -#define __ROTATION_H__ +#ifndef __OPENSPACE_CORE___ROTATION___H__ +#define __OPENSPACE_CORE___ROTATION___H__ #include @@ -54,4 +54,4 @@ protected: } // namespace openspace -#endif // __ROTATION_H__ +#endif // __OPENSPACE_CORE___ROTATION___H__ diff --git a/include/openspace/scene/scale.h b/include/openspace/scene/scale.h index 40a694af4a..f3af6473fd 100644 --- a/include/openspace/scene/scale.h +++ b/include/openspace/scene/scale.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCALE_H__ -#define __SCALE_H__ +#ifndef __OPENSPACE_CORE___SCALE___H__ +#define __OPENSPACE_CORE___SCALE___H__ #include @@ -48,4 +48,4 @@ public: } // namespace openspace -#endif // __SCALE_H__ +#endif // __OPENSPACE_CORE___SCALE___H__ diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index 1c1fe3599f..5c94ab72ba 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -22,10 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCENE_H__ -#define __SCENE_H__ +#ifndef __OPENSPACE_CORE___SCENE___H__ +#define __OPENSPACE_CORE___SCENE___H__ -// std includes #include #include #include @@ -158,4 +157,4 @@ private: } // namespace openspace -#endif // __SCENE_H__ +#endif // __OPENSPACE_CORE___SCENE___H__ diff --git a/include/openspace/scene/scenegraph.h b/include/openspace/scene/scenegraph.h index 125f1c58d4..effc22a3cc 100644 --- a/include/openspace/scene/scenegraph.h +++ b/include/openspace/scene/scenegraph.h @@ -22,11 +22,12 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCENEGRAPH_H__ -#define __SCENEGRAPH_H__ +#ifndef __OPENSPACE_CORE___SCENEGRAPH___H__ +#define __OPENSPACE_CORE___SCENEGRAPH___H__ #include #include + namespace openspace { class SceneGraphNode; @@ -71,4 +72,4 @@ private: } // namespace openspace -#endif // __SCENEGRAPH_H__ +#endif // __OPENSPACE_CORE___SCENEGRAPH___H__ diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index 94e16f395e..c656271aac 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCENEGRAPHNODE_H__ -#define __SCENEGRAPHNODE_H__ +#ifndef __OPENSPACE_CORE___SCENEGRAPHNODE___H__ +#define __OPENSPACE_CORE___SCENEGRAPHNODE___H__ // open space includes #include @@ -138,4 +138,4 @@ private: } // namespace openspace -#endif // __SCENEGRAPHNODE_H__ +#endif // __OPENSPACE_CORE___SCENEGRAPHNODE___H__ diff --git a/include/openspace/scene/translation.h b/include/openspace/scene/translation.h index 7d7809e65f..b8b2e211bf 100644 --- a/include/openspace/scene/translation.h +++ b/include/openspace/scene/translation.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TRANSLATION_H__ -#define __TRANSLATION_H__ +#ifndef __OPENSPACE_CORE___TRANSLATION___H__ +#define __OPENSPACE_CORE___TRANSLATION___H__ #include @@ -58,6 +58,6 @@ protected: std::function _onParameterChangeCallback; }; -} // namespace openspace +} // namespace openspace -#endif // __TRANSLATION_H__ +#endif // __OPENSPACE_CORE___TRANSLATION___H__ diff --git a/include/openspace/scripting/lualibrary.h b/include/openspace/scripting/lualibrary.h index 36f4c05d1d..7c9f25c3a9 100644 --- a/include/openspace/scripting/lualibrary.h +++ b/include/openspace/scripting/lualibrary.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __LUALIBRARY_H__ -#define __LUALIBRARY_H__ +#ifndef __OPENSPACE_CORE___LUALIBRARY___H__ +#define __OPENSPACE_CORE___LUALIBRARY___H__ #include @@ -62,4 +62,4 @@ struct LuaLibrary { } // namespace scripting } // namespace openspace -#endif // __LUALIBRARY_H__ +#endif // __OPENSPACE_CORE___LUALIBRARY___H__ diff --git a/include/openspace/scripting/scriptengine.h b/include/openspace/scripting/scriptengine.h index 9e02e117ed..c87beddaa8 100644 --- a/include/openspace/scripting/scriptengine.h +++ b/include/openspace/scripting/scriptengine.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCRIPTENGINE_H__ -#define __SCRIPTENGINE_H__ +#ifndef __OPENSPACE_CORE___SCRIPTENGINE___H__ +#define __OPENSPACE_CORE___SCRIPTENGINE___H__ #include #include @@ -121,11 +121,9 @@ private: bool _logScripts = true; std::string _logType; std::string _logFilename; - - }; } // namespace scripting } // namespace openspace -#endif // __SCRIPTENGINE_H__ +#endif // __OPENSPACE_CORE___SCRIPTENGINE___H__ diff --git a/include/openspace/scripting/scriptscheduler.h b/include/openspace/scripting/scriptscheduler.h index b5450d7996..3f9f44916d 100644 --- a/include/openspace/scripting/scriptscheduler.h +++ b/include/openspace/scripting/scriptscheduler.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCRIPTSCHEDULER_H__ -#define __SCRIPTSCHEDULER_H__ +#ifndef __OPENSPACE_CORE___SCRIPTSCHEDULER___H__ +#define __OPENSPACE_CORE___SCRIPTSCHEDULER___H__ #include #include @@ -126,4 +126,4 @@ private: } // namespace scripting } // namespace openspace -#endif // __SCRIPTSCHEDULER_H__ +#endif // __OPENSPACE_CORE___SCRIPTSCHEDULER___H__ diff --git a/include/openspace/util/blockplaneintersectiongeometry.h b/include/openspace/util/blockplaneintersectiongeometry.h index 58292c967f..70117c36cd 100644 --- a/include/openspace/util/blockplaneintersectiongeometry.h +++ b/include/openspace/util/blockplaneintersectiongeometry.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __BLOCKPLANEINTERSECTIONGEOMETRY_H__ -#define __BLOCKPLANEINTERSECTIONGEOMETRY_H__ +#ifndef __OPENSPACE_CORE___BLOCKPLANEINTERSECTIONGEOMETRY___H__ +#define __OPENSPACE_CORE___BLOCKPLANEINTERSECTIONGEOMETRY___H__ #include #include @@ -55,6 +55,6 @@ private: float _planeDistance; }; -} +} // namespace openspace -#endif // __BLOCKPLANEINTERSECTIONGEOMETRY_H__ +#endif // __OPENSPACE_CORE___BLOCKPLANEINTERSECTIONGEOMETRY___H__ diff --git a/include/openspace/util/boxgeometry.h b/include/openspace/util/boxgeometry.h index ea16642a5a..8b87f29397 100644 --- a/include/openspace/util/boxgeometry.h +++ b/include/openspace/util/boxgeometry.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __BOXGEOMETRY_H__ -#define __BOXGEOMETRY_H__ +#ifndef __OPENSPACE_CORE___BOXGEOMETRY___H__ +#define __OPENSPACE_CORE___BOXGEOMETRY___H__ #include #include @@ -46,4 +46,4 @@ public: } // namespace openspace -#endif // __BOXGEOMETRY_H__ +#endif // __OPENSPACE_CORE___BOXGEOMETRY___H__ diff --git a/include/openspace/util/camera.h b/include/openspace/util/camera.h index e2de5a6099..87184d080d 100644 --- a/include/openspace/util/camera.h +++ b/include/openspace/util/camera.h @@ -22,182 +22,181 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __CAMERA_H__ -#define __CAMERA_H__ +#ifndef __OPENSPACE_CORE___CAMERA___H__ +#define __OPENSPACE_CORE___CAMERA___H__ #include -// open space includes #include #include #include -// glm includes #include #include #include #include namespace openspace { - class SyncBuffer; +class SyncBuffer; - /** - This class still needs some more love. Suggested improvements: - - Remove psc from the camera class interface. - - Accessors should return constant references to double precision class members. - - Remove the scaling variable (What is it used for?) - - Remove the maxFov and sinMaxfov variables. Redundant since the fov is embedded - within the perspective projection matrix. - - Remove focusposition, part of the integration with the scale graph. The - "focus position" should not be needed since we assume the camera is always - positioned relative to its origin. When orbiting another object (not in origin), - the focus position should probably be handled outside the camera class - (interaction handler) since it does not affect the state of the camera - (only how it interacts). - - The class might need some more reasonable accessors depending on use cases. - (up vector world space?) - - Make clear which function returns a combined view matrix (things that are - dependent on the separate sgct nodes). +/** + * This class still needs some more love. Suggested improvements: + * - Remove psc from the camera class interface. + * - Accessors should return constant references to double precision class members. + * - Remove the scaling variable (What is it used for?) + * - Remove the maxFov and sinMaxfov variables. Redundant since the fov is embedded + * within the perspective projection matrix. + * - Remove focusposition, part of the integration with the scale graph. The + * "focus position" should not be needed since we assume the camera is always + * positioned relative to its origin. When orbiting another object (not in origin), + * the focus position should probably be handled outside the camera class + * (interaction handler) since it does not affect the state of the camera + * (only how it interacts). + * - The class might need some more reasonable accessors depending on use cases. + * (up vector world space?) + * - Make clear which function returns a combined view matrix (things that are + * dependent on the separate sgct nodes). */ - class Camera { - /** - Used to explicitly show which variables within the Camera class that are used - for caching. +class Camera { + /** + * Used to explicitly show which variables within the Camera class that are used + * for caching. */ - template - struct Cached - { - Cached() { isDirty = true; } - T datum; - bool isDirty; - }; - - // now working with float precision. To be changed to double later. - // The reason double does not work yet is because of the setUniform function - // in ghoul::opengl - typedef glm::dquat Quat; - typedef glm::dmat4 Mat4; - typedef glm::dvec3 Vec3; - - // Static constants - static const Vec3 _VIEW_DIRECTION_CAMERA_SPACE; - static const Vec3 _LOOKUP_VECTOR_CAMERA_SPACE; - public: - Camera(); - Camera(const Camera& o); - ~Camera(); - - // Mutators - void setPositionVec3(Vec3 pos); - void setFocusPositionVec3(Vec3 pos); - void setRotation(Quat rotation); - void setScaling(glm::vec2 scaling); - void setMaxFov(float fov); - - // Relative mutators - void rotate(Quat rotation); - - // Accessors - // Remove Vec3 from the name when psc is gone - const Vec3& positionVec3() const; - const Vec3& unsynchedPositionVec3() const; - const Vec3& focusPositionVec3() const; - const Vec3& viewDirectionWorldSpace() const; - const Vec3& lookUpVectorCameraSpace() const; - const Vec3& lookUpVectorWorldSpace() const; - const glm::vec2& scaling() const; - const Mat4& viewRotationMatrix() const; - const Quat& rotationQuaternion() const; - float maxFov() const; - float sinMaxFov() const; - - // @TODO this should simply be called viewMatrix! - // Or it needs to be changed so that it actually is combined. Right now it is - // only the view matrix that is the same for all SGCT cameras. - // Right now this function returns the actual combined matrix which makes some - // of the old calls to the function wrong.. - const Mat4& combinedViewMatrix() const; - - void invalidateCache(); - - void serialize(std::ostream& os) const; - void deserialize(std::istream& is); - - /** - Handles SGCT's internal matrices. Also caches a calculated viewProjection - matrix. This is the data that is different for different cameras within - SGCT. - */ - class SgctInternal { - friend class Camera; - public: - void setViewMatrix(glm::mat4 viewMatrix); - void setProjectionMatrix(glm::mat4 projectionMatrix); - - const glm::mat4& viewMatrix() const; - const glm::mat4& projectionMatrix() const; - const glm::mat4& viewProjectionMatrix() const; - private: - SgctInternal(); - SgctInternal(const SgctInternal& o) - : _viewMatrix(o._viewMatrix) - , _projectionMatrix(o._projectionMatrix) - , _cachedViewProjectionMatrix(o._cachedViewProjectionMatrix) - {} - - // State - glm::mat4 _viewMatrix; - glm::mat4 _projectionMatrix; - - // Cache - mutable Cached _cachedViewProjectionMatrix; - mutable std::mutex _mutex; - } sgctInternal; - - // Deprecated - [[deprecated("Replaced by Camera::setPositionVec3()")]] - void setPosition(psc pos); - [[deprecated("Replaced by Camera::setFocusPositionVec3()")]] - void setFocusPosition(psc pos); - [[deprecated("Replaced by Camera::positionVec3()")]] - psc position() const; - [[deprecated("Replaced by Camera::unsynchedPositionVec3()")]] - psc unsynchedPosition() const; - [[deprecated("Replaced by Camera::focusPositionVec3()")]] - psc focusPosition() const; - // @TODO use Camera::SgctInternal interface instead - [[deprecated("Replaced by Camera::SgctInternal::viewMatrix()")]] - const glm::mat4& viewMatrix() const; - [[deprecated("Replaced by Camera::SgctInternal::projectionMatrix()")]] - const glm::mat4& projectionMatrix() const; - [[deprecated("Replaced by Camera::SgctInternal::viewProjectionMatrix()")]] - const glm::mat4& viewProjectionMatrix() const; - - - std::vector getSyncables(); - - - private: - - SyncData _position; - SyncData _rotation; - SyncData _scaling; - - - // _focusPosition to be removed - Vec3 _focusPosition; - float _maxFov; - - // Cached data - mutable Cached _cachedViewDirection; - mutable Cached _cachedLookupVector; - mutable Cached _cachedViewRotationMatrix; - mutable Cached _cachedCombinedViewMatrix; - mutable Cached _cachedSinMaxFov; - - mutable std::mutex _mutex; + template + struct Cached + { + Cached() { isDirty = true; } + T datum; + bool isDirty; }; + + // now working with float precision. To be changed to double later. + // The reason double does not work yet is because of the setUniform function + // in ghoul::opengl + typedef glm::dquat Quat; + typedef glm::dmat4 Mat4; + typedef glm::dvec3 Vec3; + + // Static constants + static const Vec3 _VIEW_DIRECTION_CAMERA_SPACE; + static const Vec3 _LOOKUP_VECTOR_CAMERA_SPACE; +public: + Camera(); + Camera(const Camera& o); + ~Camera(); + + // Mutators + void setPositionVec3(Vec3 pos); + void setFocusPositionVec3(Vec3 pos); + void setRotation(Quat rotation); + void setScaling(glm::vec2 scaling); + void setMaxFov(float fov); + + // Relative mutators + void rotate(Quat rotation); + + // Accessors + // Remove Vec3 from the name when psc is gone + const Vec3& positionVec3() const; + const Vec3& unsynchedPositionVec3() const; + const Vec3& focusPositionVec3() const; + const Vec3& viewDirectionWorldSpace() const; + const Vec3& lookUpVectorCameraSpace() const; + const Vec3& lookUpVectorWorldSpace() const; + const glm::vec2& scaling() const; + const Mat4& viewRotationMatrix() const; + const Quat& rotationQuaternion() const; + float maxFov() const; + float sinMaxFov() const; + + // @TODO this should simply be called viewMatrix! + // Or it needs to be changed so that it actually is combined. Right now it is + // only the view matrix that is the same for all SGCT cameras. + // Right now this function returns the actual combined matrix which makes some + // of the old calls to the function wrong.. + const Mat4& combinedViewMatrix() const; + + void invalidateCache(); + + void serialize(std::ostream& os) const; + void deserialize(std::istream& is); + + /** + Handles SGCT's internal matrices. Also caches a calculated viewProjection + matrix. This is the data that is different for different cameras within + SGCT. + */ + class SgctInternal { + friend class Camera; + public: + void setViewMatrix(glm::mat4 viewMatrix); + void setProjectionMatrix(glm::mat4 projectionMatrix); + + const glm::mat4& viewMatrix() const; + const glm::mat4& projectionMatrix() const; + const glm::mat4& viewProjectionMatrix() const; + private: + SgctInternal(); + SgctInternal(const SgctInternal& o) + : _viewMatrix(o._viewMatrix) + , _projectionMatrix(o._projectionMatrix) + , _cachedViewProjectionMatrix(o._cachedViewProjectionMatrix) + {} + + // State + glm::mat4 _viewMatrix; + glm::mat4 _projectionMatrix; + + // Cache + mutable Cached _cachedViewProjectionMatrix; + mutable std::mutex _mutex; + } sgctInternal; + + // Deprecated + [[deprecated("Replaced by Camera::setPositionVec3()")]] + void setPosition(psc pos); + [[deprecated("Replaced by Camera::setFocusPositionVec3()")]] + void setFocusPosition(psc pos); + [[deprecated("Replaced by Camera::positionVec3()")]] + psc position() const; + [[deprecated("Replaced by Camera::unsynchedPositionVec3()")]] + psc unsynchedPosition() const; + [[deprecated("Replaced by Camera::focusPositionVec3()")]] + psc focusPosition() const; + // @TODO use Camera::SgctInternal interface instead + [[deprecated("Replaced by Camera::SgctInternal::viewMatrix()")]] + const glm::mat4& viewMatrix() const; + [[deprecated("Replaced by Camera::SgctInternal::projectionMatrix()")]] + const glm::mat4& projectionMatrix() const; + [[deprecated("Replaced by Camera::SgctInternal::viewProjectionMatrix()")]] + const glm::mat4& viewProjectionMatrix() const; + + + std::vector getSyncables(); + + +private: + + SyncData _position; + SyncData _rotation; + SyncData _scaling; + + + // _focusPosition to be removed + Vec3 _focusPosition; + float _maxFov; + + // Cached data + mutable Cached _cachedViewDirection; + mutable Cached _cachedLookupVector; + mutable Cached _cachedViewRotationMatrix; + mutable Cached _cachedCombinedViewMatrix; + mutable Cached _cachedSinMaxFov; + + mutable std::mutex _mutex; +}; + } // namespace openspace -#endif // __CAMERA_H__ +#endif // __OPENSPACE_CORE___CAMERA___H__ diff --git a/include/openspace/util/factorymanager.h b/include/openspace/util/factorymanager.h index acee69b919..663376d7f1 100644 --- a/include/openspace/util/factorymanager.h +++ b/include/openspace/util/factorymanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __FACTORYMANAGER_H__ -#define __FACTORYMANAGER_H__ +#ifndef __OPENSPACE_CORE___FACTORYMANAGER___H__ +#define __OPENSPACE_CORE___FACTORYMANAGER___H__ #include #include @@ -129,4 +129,4 @@ private: #include -#endif // __FACTORYMANAGER_H__ +#endif // __OPENSPACE_CORE___FACTORYMANAGER___H__ diff --git a/include/openspace/util/gpudata.h b/include/openspace/util/gpudata.h index eb9d0928d9..aac40f5ba8 100644 --- a/include/openspace/util/gpudata.h +++ b/include/openspace/util/gpudata.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __GPUDATA_H__ -#define __GPUDATA_H__ +#ifndef __OPENSPACE_CORE___GPUDATA___H__ +#define __OPENSPACE_CORE___GPUDATA___H__ #include #include @@ -105,4 +105,4 @@ private: } // namespace openspace -#endif // __GPUDATA_H__ +#endif // __OPENSPACE_CORE___GPUDATA___H__ diff --git a/include/openspace/util/histogram.h b/include/openspace/util/histogram.h index bc8affbaf5..1324b08096 100644 --- a/include/openspace/util/histogram.h +++ b/include/openspace/util/histogram.h @@ -22,15 +22,15 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __HISTOGRAM_H__ -#define __HISTOGRAM_H__ +#ifndef __OPENSPACE_CORE___HISTOGRAM___H__ +#define __OPENSPACE_CORE___HISTOGRAM___H__ #include #include namespace openspace { -class Histogram { +class Histogram { public: Histogram(); Histogram(float minValue, float maxValue, int numBins); @@ -86,7 +86,8 @@ private: std::vector _equalizer; int _numValues; -}; // class Histogram +}; + } // namespace openspace -#endif //__HISTOGRAM_H__ +#endif //__OPENSPACE_CORE___HISTOGRAM___H__ diff --git a/include/openspace/util/keys.h b/include/openspace/util/keys.h index 9c41fea2df..f65c13a261 100644 --- a/include/openspace/util/keys.h +++ b/include/openspace/util/keys.h @@ -51,8 +51,8 @@ * *************************************************************************/ -#ifndef __KEYS_H__ -#define __KEYS_H__ +#ifndef __OPENSPACE_CORE___KEYS___H__ +#define __OPENSPACE_CORE___KEYS___H__ // All values that are defined here are compatible with (and are based on) the // definitions GLFW v3.1 @@ -369,4 +369,4 @@ std::string to_string(openspace::KeyWithModifier key); } // namespace std -#endif // __KEYS_H__ +#endif // __OPENSPACE_CORE___KEYS___H__ diff --git a/include/openspace/util/mouse.h b/include/openspace/util/mouse.h index 32c399bbf8..c616ec73a4 100644 --- a/include/openspace/util/mouse.h +++ b/include/openspace/util/mouse.h @@ -54,8 +54,8 @@ // All values that are defined here are compatible with (and are based on) the // definitions GLFW v3.1 -#ifndef __MOUSE_H__ -#define __MOUSE_H__ +#ifndef __OPENSPACE_CORE___MOUSE___H__ +#define __OPENSPACE_CORE___MOUSE___H__ namespace openspace { @@ -92,4 +92,4 @@ enum class MouseButton { } // namespace openspace -#endif // __MOUSE_H__ +#endif // __OPENSPACE_CORE___MOUSE___H__ diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h index 83d0b6e444..266c07a0c9 100644 --- a/include/openspace/util/openspacemodule.h +++ b/include/openspace/util/openspacemodule.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACEMODULE_H__ -#define __OPENSPACEMODULE_H__ +#ifndef __OPENSPACE_CORE___OPENSPACEMODULE___H__ +#define __OPENSPACE_CORE___OPENSPACEMODULE___H__ #include @@ -104,4 +104,4 @@ protected: } // namespace openspace -#endif // __OPENSPACEMODULE_H__ +#endif // __OPENSPACE_CORE___OPENSPACEMODULE___H__ diff --git a/include/openspace/util/powerscaledcoordinate.h b/include/openspace/util/powerscaledcoordinate.h index ec79a38931..75cfb94e85 100644 --- a/include/openspace/util/powerscaledcoordinate.h +++ b/include/openspace/util/powerscaledcoordinate.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __POWERSCALEDCOORDINATE_H__ -#define __POWERSCALEDCOORDINATE_H__ +#ifndef __OPENSPACE_CORE___POWERSCALEDCOORDINATE___H__ +#define __OPENSPACE_CORE___POWERSCALEDCOORDINATE___H__ // open space includes // glm includes @@ -119,4 +119,4 @@ typedef PowerScaledCoordinate psc; } // namespace openspace -#endif // __POWERSCALEDCOORDINATE_H__ +#endif // __OPENSPACE_CORE___POWERSCALEDCOORDINATE___H__ diff --git a/include/openspace/util/powerscaledscalar.h b/include/openspace/util/powerscaledscalar.h index 106070a8a1..2fe2aea57d 100644 --- a/include/openspace/util/powerscaledscalar.h +++ b/include/openspace/util/powerscaledscalar.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __POWERSCALEDSCALAR_H__ -#define __POWERSCALEDSCALAR_H__ +#ifndef __OPENSPACE_CORE___POWERSCALEDSCALAR___H__ +#define __OPENSPACE_CORE___POWERSCALEDSCALAR___H__ // glm includes #include @@ -92,4 +92,4 @@ typedef PowerScaledScalar pss; } // namespace openspace -#endif // __POWERSCALEDSCALAR_H__ +#endif // __OPENSPACE_CORE___POWERSCALEDSCALAR___H__ diff --git a/include/openspace/util/powerscaledsphere.h b/include/openspace/util/powerscaledsphere.h index c7e6bd8576..da8e80ba90 100644 --- a/include/openspace/util/powerscaledsphere.h +++ b/include/openspace/util/powerscaledsphere.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __POWERSCALEDSPHERE_H__ -#define __POWERSCALEDSPHERE_H__ +#ifndef __OPENSPACE_CORE___POWERSCALEDSPHERE___H__ +#define __OPENSPACE_CORE___POWERSCALEDSPHERE___H__ // open space includes #include @@ -69,4 +69,4 @@ public: } // namespace openspace -#endif // __POWERSCALEDSPHERE_H__ +#endif // __OPENSPACE_CORE___POWERSCALEDSPHERE___H__ diff --git a/include/openspace/util/progressbar.h b/include/openspace/util/progressbar.h index ee8567efcc..92f988958f 100644 --- a/include/openspace/util/progressbar.h +++ b/include/openspace/util/progressbar.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __PROGRESSBAR_H__ -#define __PROGRESSBAR_H__ +#ifndef __OPENSPACE_CORE___PROGRESSBAR___H__ +#define __OPENSPACE_CORE___PROGRESSBAR___H__ #include @@ -43,9 +43,8 @@ private: int _previous; int _end; std::ostream& _stream; - }; } // namespace openspace -#endif // __PROGRESSBAR_H__ +#endif // __OPENSPACE_CORE___PROGRESSBAR___H__ diff --git a/include/openspace/util/screenlog.h b/include/openspace/util/screenlog.h index afeaf2ecc2..b6bea017de 100644 --- a/include/openspace/util/screenlog.h +++ b/include/openspace/util/screenlog.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SCREENLOG_H__ -#define __SCREENLOG_H__ +#ifndef __OPENSPACE_CORE___SCREENLOG___H__ +#define __OPENSPACE_CORE___SCREENLOG___H__ #include @@ -115,4 +115,4 @@ private: } // namespace openspace -#endif // __SCREENLOG_H__ +#endif // __OPENSPACE_CORE___SCREENLOG___H__ diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 10a2309dbe..6350a26a43 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SPICEMANAGER_H__ -#define __SPICEMANAGER_H__ +#ifndef __OPENSPACE_CORE___SPICEMANAGER___H__ +#define __OPENSPACE_CORE___SPICEMANAGER___H__ #include @@ -931,4 +931,4 @@ private: } // namespace openspace -#endif // __SPICEMANAGER_H__ \ No newline at end of file +#endif // __OPENSPACE_CORE___SPICEMANAGER___H__ diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index 6a63b41a9a..2e00eba951 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef SYNCBUFFER_H -#define SYNCBUFFER_H +#ifndef __OPENSPACE_CORE___SYNCBUFFER___H__ +#define __OPENSPACE_CORE___SYNCBUFFER___H__ #include #include @@ -116,4 +116,4 @@ private: } // namespace openspace -#endif // SYNCBUFFER_H +#endif // __OPENSPACE_CORE___SYNCBUFFER___H__ diff --git a/include/openspace/util/syncdata.h b/include/openspace/util/syncdata.h index 7eb638dc6c..4c491b539c 100644 --- a/include/openspace/util/syncdata.h +++ b/include/openspace/util/syncdata.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __SYNC_DATA_H__ -#define __SYNC_DATA_H__ +#ifndef __OPENSPACE_CORE___SYNCDATA___H__ +#define __OPENSPACE_CORE___SYNCDATA___H__ #include #include @@ -31,15 +31,13 @@ #include #include - namespace openspace { - /** -* Interface for synchronizable data -* -* Used by SyncEngine -*/ + * Interface for synchronizable data + * + * Used by SyncEngine + */ class Syncable { public: virtual ~Syncable() {}; @@ -55,17 +53,17 @@ protected: }; /** -* A double buffered implementation of the Syncable interface. -* Users are encouraged to used this class as a default way to synchronize different -* C++ data types using the SyncEngine -* -* This class aims to handle the synchronization parts and yet act like a regular -* instance of T. Implicit casts are supported, however, when accessing member functions or -* or variables, user may have to do explicit casts. -* -* ((T&) t).method(); -* -*/ + * A double buffered implementation of the Syncable interface. + * Users are encouraged to used this class as a default way to synchronize different + * C++ data types using the SyncEngine + * + * This class aims to handle the synchronization parts and yet act like a regular + * instance of T. Implicit casts are supported, however, when accessing member functions or + * or variables, user may have to do explicit casts. + * + * ((T&) t).method(); + * + */ template class SyncData : public Syncable { public: @@ -77,29 +75,28 @@ public: }; /** - * Allowing assignment of data as if - */ + * Allowing assignment of data as if + */ SyncData& operator=(const T& rhs) { data = rhs; return *this; } /** - * Allow implicit cast to referenced T - */ + * Allow implicit cast to referenced T + */ operator T&() { return data; } /** - * Allow implicit cast to const referenced T - */ + * Allow implicit cast to const referenced T + */ operator const T&() const { return data; } protected: - virtual void encode(SyncBuffer* syncBuffer) { _mutex.lock(); syncBuffer->encode(data); @@ -121,14 +118,12 @@ protected: } }; - T data; T doubleBufferedData; std::mutex _mutex; }; - } // namespace openspace -#endif //#ifndef __SYNC_DATA_H__ +#endif // __OPENSPACE_CORE___SYNCDATA___H__ diff --git a/include/openspace/util/time.h b/include/openspace/util/time.h index 9657b71dcb..e8b525539b 100644 --- a/include/openspace/util/time.h +++ b/include/openspace/util/time.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TIME_H__ -#define __TIME_H__ +#ifndef __OPENSPACE_CORE___TIME___H__ +#define __OPENSPACE_CORE___TIME___H__ #include #include @@ -224,4 +224,4 @@ private: } // namespace openspace -#endif // __TIME_H__ +#endif // __OPENSPACE_CORE___TIME___H__ diff --git a/include/openspace/util/timemanager.h b/include/openspace/util/timemanager.h index fd0b9c4e19..fb9468bcc9 100644 --- a/include/openspace/util/timemanager.h +++ b/include/openspace/util/timemanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TIMEMANAGER_H__ -#define __TIMEMANAGER_H__ +#ifndef __OPENSPACE_CORE___TIMEMANAGER___H__ +#define __OPENSPACE_CORE___TIMEMANAGER___H__ #include #include @@ -45,7 +45,6 @@ private: double _latestConsumedTimestamp; }; -} +} // namespace openspace - -#endif // __TIMEMANAGER_H__ \ No newline at end of file +#endif // __OPENSPACE_CORE___TIMEMANAGER___H__ diff --git a/include/openspace/util/timerange.h b/include/openspace/util/timerange.h index 4e82e0dacf..80a99c1fbf 100644 --- a/include/openspace/util/timerange.h +++ b/include/openspace/util/timerange.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TIMERANGE_H__ -#define __TIMERANGE_H__ +#ifndef __OPENSPACE_CORE___TIMERANGE___H__ +#define __OPENSPACE_CORE___TIMERANGE___H__ #include @@ -78,4 +78,4 @@ struct TimeRange { } // namespace openspace -#endif //__TIMERANGE_H__ +#endif //__OPENSPACE_CORE___TIMERANGE___H__ diff --git a/include/openspace/util/transformationmanager.h b/include/openspace/util/transformationmanager.h index abc6cfb741..c2b655fd5b 100644 --- a/include/openspace/util/transformationmanager.h +++ b/include/openspace/util/transformationmanager.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __TRANSFORMATIONMANAGER__ -#define __TRANSFORMATIONMANAGER__ +#ifndef __OPENSPACE_CORE___TRANSFORMATIONMANAGER___H__ +#define __OPENSPACE_CORE___TRANSFORMATIONMANAGER___H__ #include #include @@ -59,6 +59,6 @@ private: std::set _dipoleFrames; }; -} +} // namespace openspace - #endif //__TRANSFORMATIONMANAGER__ \ No newline at end of file + #endif //__OPENSPACE_CORE___TRANSFORMATIONMANAGER___H__ diff --git a/include/openspace/util/updatestructures.h b/include/openspace/util/updatestructures.h index 1f33fdb519..6708532276 100644 --- a/include/openspace/util/updatestructures.h +++ b/include/openspace/util/updatestructures.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __UPDATESTRUCTURES_H__ -#define __UPDATESTRUCTURES_H__ +#ifndef __OPENSPACE_CORE___UPDATESTRUCTURES___H__ +#define __OPENSPACE_CORE___UPDATESTRUCTURES___H__ #include #include @@ -76,7 +76,6 @@ struct RaycastData { std::string namespaceName; }; +} // namespace openspace -} - -#endif // __UPDATESTRUCTURES_H__ +#endif // __OPENSPACE_CORE___UPDATESTRUCTURES___H__ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 63eb258dcc..6522114623 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -47,14 +47,6 @@ set(OPENSPACE_SOURCE ${OPENSPACE_BASE_DIR}/src/interaction/keyboardcontroller.cpp ${OPENSPACE_BASE_DIR}/src/interaction/luaconsole.cpp ${OPENSPACE_BASE_DIR}/src/interaction/luaconsole_lua.inl - ${OPENSPACE_BASE_DIR}/src/interaction/mousecontroller.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/externalconnectioncontroller.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/externalcontrol.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/joystickexternalcontrol.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/keyboardexternalcontrol.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/mouseexternalcontrol.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/pythonexternalcontrol.cpp - ${OPENSPACE_BASE_DIR}/src/interaction/externalcontrol/randomexternalcontrol.cpp ${OPENSPACE_BASE_DIR}/src/mission/mission.cpp ${OPENSPACE_BASE_DIR}/src/mission/missionmanager.cpp ${OPENSPACE_BASE_DIR}/src/mission/missionmanager_lua.inl @@ -189,14 +181,6 @@ set(OPENSPACE_HEADER ${OPENSPACE_BASE_DIR}/include/openspace/interaction/interactionmode.h ${OPENSPACE_BASE_DIR}/include/openspace/interaction/keyboardcontroller.h ${OPENSPACE_BASE_DIR}/include/openspace/interaction/luaconsole.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/mousecontroller.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/externalconnectioncontroller.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/externalcontrol.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/joystickexternalcontrol.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/keyboardexternalcontrol.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/mouseexternalcontrol.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/pythonexternalcontrol.h - ${OPENSPACE_BASE_DIR}/include/openspace/interaction/externalcontrol/randomexternalcontrol.h ${OPENSPACE_BASE_DIR}/include/openspace/mission/mission.h ${OPENSPACE_BASE_DIR}/include/openspace/mission/missionmanager.h ${OPENSPACE_BASE_DIR}/include/openspace/network/networkengine.h @@ -309,6 +293,7 @@ set(OPENSPACE_HEADER ${OPENSPACE_BASE_DIR}/include/openspace/util/syncdata.h ${OPENSPACE_BASE_DIR}/include/openspace/util/time.h ${OPENSPACE_BASE_DIR}/include/openspace/util/timemanager.h + ${OPENSPACE_BASE_DIR}/include/openspace/util/timerange.h ${OPENSPACE_BASE_DIR}/include/openspace/util/updatestructures.h ${OPENSPACE_BASE_DIR}/include/openspace/util/transformationmanager.h ${OPENSPACE_BASE_DIR}/include/openspace/util/histogram.h diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 96872125d5..a28db33452 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -79,7 +78,7 @@ #endif #ifdef OPENSPACE_MODULE_ISWA_ENABLED -#include +#include #include #endif diff --git a/src/interaction/deviceidentifier.cpp b/src/interaction/deviceidentifier.cpp index def1c670a2..2da4ec2509 100644 --- a/src/interaction/deviceidentifier.cpp +++ b/src/interaction/deviceidentifier.cpp @@ -1,3 +1,26 @@ +/***************************************************************************************** + * * + * 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. * + ****************************************************************************************/ // open space includes #include diff --git a/src/interaction/externalcontrol/externalconnectioncontroller.cpp b/src/interaction/externalcontrol/externalconnectioncontroller.cpp deleted file mode 100644 index 5482c9b3de..0000000000 --- a/src/interaction/externalcontrol/externalconnectioncontroller.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include - -namespace openspace { - -ExternalConnectionController::ExternalConnectionController() { -} - -ExternalConnectionController::~ExternalConnectionController() { - -} - -} // namespace openspace \ No newline at end of file diff --git a/src/interaction/externalcontrol/externalcontrol.cpp b/src/interaction/externalcontrol/externalcontrol.cpp deleted file mode 100644 index 1c279a0dfb..0000000000 --- a/src/interaction/externalcontrol/externalcontrol.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include - -namespace openspace { - -ExternalControl::ExternalControl() { - -} - -ExternalControl::~ExternalControl() { -} - -void ExternalControl::update() { - -} - -void ExternalControl::rotate(const glm::quat &rotation) { - //OsEng.interactionHandler().rotate(rotation); -} - -void ExternalControl::orbit(const glm::quat &rotation) { - //OsEng.interactionHandler().orbit(rotation); -} - -void ExternalControl::distance(const PowerScaledScalar &distance) { - //OsEng.interactionHandler().distance(distance); -} - - -} // namespace openspace - diff --git a/src/interaction/externalcontrol/joystickexternalcontrol.cpp b/src/interaction/externalcontrol/joystickexternalcontrol.cpp deleted file mode 100644 index 0e5f4500ca..0000000000 --- a/src/interaction/externalcontrol/joystickexternalcontrol.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//#include "externalcontrol/joystickexternalcontrol.h" -//#include "deviceidentifier.h" -// -//// workaround since Python debug does not work on windows -//#ifdef _DEBUG -//#undef _DEBUG -//#include -//#define _DEBUG -//#else -//#include -//#endif -// -//namespace openspace { -// -// -//JoystickExternalControl::JoystickExternalControl(const char *filename): PythonExternalControl(filename) { -//} -// -//void JoystickExternalControl::setInputDevice(const int device) { -// if(device >= 0 && device <= 16) { -// inputDevice_ = device; -// numberOfButtons_ = DeviceIdentifier::ref().getButtons(inputDevice_); -// numberOfAxes_ = DeviceIdentifier::ref().getAxes(inputDevice_); -// clear(); -// pyarrSize_ = numberOfButtons_ + numberOfAxes_; -// pyarr_ = new PyObject*[pyarrSize_]; -// } -// -//} -// -//void JoystickExternalControl::update() { -// -// if(inputDevice_ != -1) { -// float *axesPos; -// unsigned char *buttons; -// DeviceIdentifier::ref().getButtons(inputDevice_, &buttons); -// DeviceIdentifier::ref().getAxes(inputDevice_, &axesPos); -// -// // init array -// for(int i = 0; i < numberOfButtons_; ++i){ -// pyarr_[i] = PyLong_FromLong(buttons[i]); -// } -// for(int i = 0; i < numberOfAxes_; ++i){ -// pyarr_[i+numberOfButtons_] = PyFloat_FromDouble(axesPos[i]); -// } -// } -// -// run(); -// -// if(inputDevice_ != -1) { -// // cleanup -// for(int i = 0; i < pyarrSize_; ++i) { -// Py_DECREF(pyarr_[i]); -// } -// } -// -//} -// -//JoystickExternalControl::~JoystickExternalControl() { -//} -// -//} // namespace openspace -// diff --git a/src/interaction/externalcontrol/keyboardexternalcontrol.cpp b/src/interaction/externalcontrol/keyboardexternalcontrol.cpp deleted file mode 100644 index 3b27afc66e..0000000000 --- a/src/interaction/externalcontrol/keyboardexternalcontrol.cpp +++ /dev/null @@ -1,62 +0,0 @@ -//#include "externalcontrol/keyboardexternalcontrol.h" -// -//// workaround since Python debug does not work on windows -//#ifdef _DEBUG -//#undef _DEBUG -//#include -//#define _DEBUG -//#else -//#include -//#endif -// -// -//namespace openspace { -// -// -//KeyboardExternalControl::KeyboardExternalControl(const char *filename): PythonExternalControl(filename) { -// clear(); -// pyarrSize_ = 'Z' - 'A' + 80; // all letters, 69 special keys, space and 10 numbers -// pyarr_ = new PyObject*[pyarrSize_]; -// for(int i = 0; i < pyarrSize_; ++i) { -// pyarr_[i] = PyLong_FromLong(0); -// } -//} -// -//void KeyboardExternalControl::keyboardCallback(int key, int action) { -// -// //printf("key: %i\n",key); -// int pos = -1; -// if(key >= '0' && key <= '9') { -// pos = key - '0'; -// Py_XDECREF(pyarr_[pos]); -// pyarr_[pos] = PyLong_FromLong(action); -// } else if(key >= 'A' && key <= 'Z') { -// pos = key - 'A' + 10; -// Py_XDECREF(pyarr_[pos]); -// pyarr_[pos] = PyLong_FromLong(action); -// } else if (key > 256 && key < 256+69) { -// pos = key - 256 + 'Z'-'A' +10; -// Py_XDECREF(pyarr_[pos]); -// pyarr_[pos] = PyLong_FromLong(action); -// } else if (key == 32) { -// pos = 'Z' - 'A' + 11; -// Py_XDECREF(pyarr_[pos]); -// pyarr_[pos] = PyLong_FromLong(action); -// } -// //printf("pos: %i\n",pos); -//} -// -// -// -//void KeyboardExternalControl::update() { -// run(); -//} -// -//KeyboardExternalControl::~KeyboardExternalControl() { -// for(int i = 0; i < pyarrSize_; ++i) { -// Py_XDECREF(pyarr_[i]); -// } -//} -// -//} // namespace openspace -// diff --git a/src/interaction/externalcontrol/mouseexternalcontrol.cpp b/src/interaction/externalcontrol/mouseexternalcontrol.cpp deleted file mode 100644 index 41d93bd951..0000000000 --- a/src/interaction/externalcontrol/mouseexternalcontrol.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//#include "externalcontrol/mouseexternalcontrol.h" -// -//// workaround since Python debug does not work on windows -//#ifdef _DEBUG -//#undef _DEBUG -//#include -//#define _DEBUG -//#else -//#include -//#endif -// -// -//namespace openspace { -// -// -//MouseExternalControl::MouseExternalControl(const char *filename): PythonExternalControl(filename) { -// clear(); -// pyarrSize_ = 6*2; -// pyarr_ = new PyObject*[pyarrSize_]; -// x_ = 0; -// y_ = 0; -// pos_ = 0; -// button1_ = 0; -// button2_ = 0; -// button3_ = 0; -// for(int i = 0; i < pyarrSize_; ++i) { -// pyarr_[i] = PyLong_FromLong(0);; -// } -// -//} -// -//void MouseExternalControl::mouseButtonCallback(int key, int action) { -// if(key == 0) -// button1_ = action; -// if(key == 1) -// button2_ = action; -// if(key == 2) -// button3_ = action; -//} -// -//void MouseExternalControl::mousePosCallback(int x, int y) { -// x_ = x; -// y_ = y; -//} -// -//void MouseExternalControl::mouseScrollCallback(int pos) { -// pos_ = pos; -//} -// -//void MouseExternalControl::update() { -// -// pyarr_[6] = pyarr_[0]; -// pyarr_[7] = pyarr_[1]; -// pyarr_[8] = pyarr_[2]; -// pyarr_[9] = pyarr_[3]; -// pyarr_[10] = pyarr_[4]; -// pyarr_[11] = pyarr_[5]; -// pyarr_[0] = PyLong_FromLong(button1_); -// pyarr_[1] = PyLong_FromLong(button2_); -// pyarr_[2] = PyLong_FromLong(button3_); -// pyarr_[3] = PyLong_FromLong(pos_); -// pyarr_[4] = PyLong_FromLong(x_); -// pyarr_[5] = PyLong_FromLong(y_); -// -// run(); -// -// // cleanup -// for(int i = pyarrSize_ / 2; i < pyarrSize_; ++i) { -// Py_XDECREF(pyarr_[i]); -// } -// -//} -// -//MouseExternalControl::~MouseExternalControl() { -// -//} -// -//} // namespace openspace -// diff --git a/src/interaction/externalcontrol/pythonexternalcontrol.cpp b/src/interaction/externalcontrol/pythonexternalcontrol.cpp deleted file mode 100644 index 541421b6d0..0000000000 --- a/src/interaction/externalcontrol/pythonexternalcontrol.cpp +++ /dev/null @@ -1,147 +0,0 @@ -//#include "externalcontrol/pythonexternalcontrol.h" -// -//// workaround since Python debug does not work on windows -//#ifdef _DEBUG -//#undef _DEBUG -//#include -//#define _DEBUG -//#else -//#include -//#endif -// -//#include -//#include -//#include -//#include -//#include "deviceidentifier.h" -// -//#include "util/pss.h" -//#include "externalcontrol/externalcontrol.h" -//#include "interactionhandler.h" -// -//namespace openspace { -// -// -//// defining python callback functions -//static PyObject* pyexcontrol_numargs(PyObject *self, PyObject *args) { -// if(!PyArg_ParseTuple(args, ":pyexcontrol_numargs")) -// return NULL; -// return PyLong_FromLong(10); -//} -// -//static PyObject* pyexcontrol_message(PyObject *self, PyObject *args) -//{ -// char* text = 0; -// if(!PyArg_ParseTuple(args, "s:pyexcontrol_yeah",&text)) -// Py_RETURN_NONE; -// -// PythonExternalControl * ext = 0; -// ext->message(text); -// -// Py_RETURN_NONE; -//} -// -//static PyObject* pyexcontrol_rotateCamera(PyObject *self, PyObject *args) -//{ -// char* text = 0; -// float f1 = 0; -// float f2 = 0; -// float f3 = 0; -// float f4 = 0; -// if(!PyArg_ParseTuple(args, "fff:pyexcontrol_rotateCamera",&f1,&f2,&f3)) -// Py_RETURN_NONE; -// -// double dt = InteractionHandler::ref().getDt(); -// glm::vec3 EulerAngles(f1*dt,f2*dt, f3*dt); -// glm::quat rot = glm::quat(EulerAngles); -// ExternalControl * ext = 0; -// ext->rotate(rot); -// -// Py_RETURN_NONE; -//} -// -//static PyObject* pyexcontrol_orbitCamera(PyObject *self, PyObject *args) -//{ -// char* text = 0; -// float f1 = 0; -// float f2 = 0; -// float f3 = 0; -// if(!PyArg_ParseTuple(args, "fff:pyexcontrol_rotateCamera",&f1,&f2,&f3)) -// Py_RETURN_NONE; -// -// double dt = InteractionHandler::ref().getDt(); -// glm::vec3 EulerAngles(f1*dt,f2*dt, f3*dt); -// glm::quat rot = glm::quat(EulerAngles); -// ExternalControl * ext = 0; -// ext->orbit(rot); -// -// Py_RETURN_NONE; -//} -// -//static PyObject* pyexcontrol_distance(PyObject *self, PyObject *args) -//{ -// char* text = 0; -// float f1 = 0; -// float f2 = 0; -// if(!PyArg_ParseTuple(args, "ff:pyexcontrol_rotateCamera",&f1,&f2)) -// Py_RETURN_NONE; -// -// float dt = static_cast(InteractionHandler::ref().getDt()); -// pss dist(f1*dt,f2); -// ExternalControl * ext = 0; -// ext->distance(dist); -// -// Py_RETURN_NONE; -//} -// -//PyMethodDef* PythonExternalControl::getMethodDef() { -// // creating the python callback function table -// static PyMethodDef pyexcontrol_methods[] = { -// {"numargs", pyexcontrol_numargs, METH_VARARGS, "function"}, -// {"message", pyexcontrol_message, METH_VARARGS, "function"}, -// {"rotate", pyexcontrol_rotateCamera, METH_VARARGS, "function"}, -// {"orbit", pyexcontrol_orbitCamera, METH_VARARGS, "function"}, -// {"distance", pyexcontrol_distance, METH_VARARGS, "function"}, -// {NULL, NULL, 0, NULL} -// }; -// return pyexcontrol_methods; -//} -// -//void PythonExternalControl::message(const char *text) { -// -// printf("Input message from PythonScript: %s\n", text); -//} -// -//PythonExternalControl::PythonExternalControl(const char *filename) { -// pyarr_ = nullptr; -// ps_.load(filename, true); -//} -// -// -//void PythonExternalControl::update() { -// run(); -//} -// -//void PythonExternalControl::run() { -// if(pyarrSize_ > 0) -// ps_.run(pyarrSize_, pyarr_); -// else -// ps_.run(); -//} -// -// -//void PythonExternalControl::clear() { -// if(pyarr_ != nullptr) { -// // cleanup -// delete pyarr_; -// pyarr_ = nullptr; -// pyarrSize_ = 0; -// } -//} -// -//PythonExternalControl::~PythonExternalControl() { -// clear(); -//} -// -//} // namespace openspace -// diff --git a/src/interaction/externalcontrol/randomexternalcontrol.cpp b/src/interaction/externalcontrol/randomexternalcontrol.cpp deleted file mode 100644 index c0d9a1d33c..0000000000 --- a/src/interaction/externalcontrol/randomexternalcontrol.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include - -#include -#ifndef _WIN32 - #include -#endif - -namespace openspace { - -typedef struct -{ - bool *keepGoing; - double *dx; -} parm; - -void *updatedx(void * arg) { - parm *p = (parm*) arg; - bool *kg = p->keepGoing; - double *dx = p->dx; - while( *kg ) { - //printf("Hello world!\n"); - *dx = *dx + 0.5; - - -#ifndef _WIN32 - // random sleep time - int diff = rand() % 200; - - usleep(10000*diff); -#endif - } - delete p; - return NULL; -} - - -RandomExternalControl::RandomExternalControl() { - /* - inputGuard = PTHREAD_MUTEX_INITIALIZER; - - pthread_attr_t pthread_custom_attr; - pthread_attr_init(&pthread_custom_attr); - keepGoing_ = new bool; - *keepGoing_ = true; - parm *p = (parm*)malloc(sizeof(parm)); - p->keepGoing = keepGoing_; - p->dx = &dx_; - - pthread_create(&backgroundThread, &pthread_custom_attr, updatedx, (void*)p); - */ -} - -RandomExternalControl::~RandomExternalControl() { - *keepGoing_ = false; - //pthread_join(backgroundThread, NULL); - delete keepGoing_; -} - -} // namespace openspace - diff --git a/src/interaction/mousecontroller.cpp b/src/interaction/mousecontroller.cpp deleted file mode 100644 index d41535fcb4..0000000000 --- a/src/interaction/mousecontroller.cpp +++ /dev/null @@ -1,257 +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 - -#include - -#include -#include - -#include - -namespace openspace { -namespace interaction { - -MouseController::MouseController() - : _lastTrackballPos(0.f) - , _isMouseBeingPressedAndHeld(false) -{} - -glm::vec3 MouseController::mapToTrackball(glm::vec2 mousePos) { - const float RADIUS = 0.5; // Sphere radius - glm::vec3 out = glm::vec3(mousePos.x - 0.5, -1.0*(mousePos.y - 0.5), 0); - - // Mapping according to Holroyds trackball - // Piece-wise sphere + hyperbolic sheet - if (out.x*out.x + out.y*out.y <= RADIUS*RADIUS / 2.0) { - //Spherical Region - out.z = RADIUS*RADIUS - (out.x*out.x + out.y*out.y); - out.z = out.z > 0.0f ? sqrtf(out.z) : 0.0f; - } - else { //Hyperbolic Region - for smooth z values - out.z = (RADIUS*RADIUS) / (2.0f*sqrt(out.x*out.x + out.y*out.y)); - } - - return glm::normalize(out); -} - -glm::vec3 MouseController::mapToCamera(glm::vec3 trackballPos) { - //Get x,y,z axis vectors of current camera view - glm::vec3 currentViewYaxis = glm::normalize(_handler->camera()->lookUpVectorCameraSpace()); - psc viewDir = _handler->camera()->position() - _handler->focusNode()->worldPosition(); - glm::vec3 currentViewZaxis = glm::normalize(viewDir.vec3()); - glm::vec3 currentViewXaxis = glm::normalize(glm::cross(currentViewYaxis, currentViewZaxis)); - - //mapping to camera co-ordinate - currentViewXaxis *= trackballPos.x; - currentViewYaxis *= trackballPos.y; - currentViewZaxis *= trackballPos.z; - return (currentViewXaxis + currentViewYaxis + currentViewZaxis); -} - -void MouseController::trackballRotate(int x, int y) { - // Normalize mouse coordinates to [0,1] - glm::vec2 res = OsEng.windowWrapper().currentWindowSize(); - glm::vec2 mousePos = glm::vec2((float)x / res.x, (float)y / res.y); - - mousePos = glm::clamp(mousePos, -0.5f, 1.5f); // Ugly fix #1: Camera position becomes NaN on mouse values outside [-0.5, 1.5] - //mousePos[1] = 0.5; // Ugly fix #2: Tempoarily only allow rotation around y - - glm::vec3 curTrackballPos = mapToTrackball(mousePos); - // LDEBUG(mousePos.x << ", " << mousePos.y << " = " << curTrackballPos.x << ", " << curTrackballPos.y << ", " << curTrackballPos.z); - - // Disable movement on the first click for extra smoothness - if (!_isMouseBeingPressedAndHeld) { - _lastTrackballPos = curTrackballPos; - _isMouseBeingPressedAndHeld = true; - } - - if (curTrackballPos != _lastTrackballPos) { - // calculate rotation angle (in radians) - float rotationAngle = glm::angle(curTrackballPos, _lastTrackballPos); - //rotationAngle *= static_cast(_handler->deltaTime()) * 100.0f; - - // Map trackballpos to camera - // glm::vec3 trackballMappedToCamera = mapToCamera(_lastTrackballPos - curTrackballPos); - // psc currentCamPos = camera_->getPosition(); - // glm::vec3 nextCamPos = currentCamPos.getVec3f() + trackballMappedToCamera; - // glm::vec3 rotationAxis = glm::cross(currentCamPos.getVec3f(), nextCamPos); - - glm::vec3 rotationAxis = glm::cross(_lastTrackballPos, curTrackballPos); - rotationAxis = glm::normalize(rotationAxis); - glm::quat quaternion = glm::angleAxis(rotationAngle, rotationAxis); - - // Apply quaternion to camera - //_handler->orbitDelta(quaternion); - - _lastTrackballPos = curTrackballPos; - } -} - - -TrackballMouseController::TrackballMouseController() - : MouseController() - , _leftMouseButtonDown(false) -{} - -void TrackballMouseController::button(MouseButton button, MouseAction action) { - if (button == MouseButton::Left && action == MouseAction::Press) - _leftMouseButtonDown = true; - else if (button == MouseButton::Left && action == MouseAction::Release) { - _leftMouseButtonDown = false; - _isMouseBeingPressedAndHeld = false; - } -} - -void TrackballMouseController::move(float x, float y) { - if (_leftMouseButtonDown) - trackballRotate(static_cast(x), static_cast(y)); -} - -void TrackballMouseController::scrollWheel(int pos) { - /* - const float speed = 4.75f; - const float dt = static_cast(_handler->deltaTime()); - if (pos < 0) { - PowerScaledScalar dist(speed * dt, 0.0f); - _handler->distanceDelta(dist); - } - else if (pos > 0) { - PowerScaledScalar dist(-speed * dt, 0.0f); - _handler->distanceDelta(dist); - } - */ -} - -void TrackballMouseController::update(const double& dt){ - -} - - -OrbitalMouseController::OrbitalMouseController() - : MouseController() - , _leftMouseButtonDown(false) - , _rightMouseButtonDown(false) - , _middleMouseButtonDown(false) - , _currentCursorPos(0) - , _rotationSpeed(10.f) - , _navigationSpeed(3.f) -{ - for (int n = 0; n < 3; ++n){ - _previousCursorPos[n] = glm::vec2(0); - } -} - -void OrbitalMouseController::button(MouseButton button, MouseAction action) { - if (button == MouseButton::Left){ - if (action == MouseAction::Press){ - _leftMouseButtonDown = true; - _previousCursorPos[MouseButtons::ButtonLeft] = OsEng.windowWrapper().mousePosition(); - } - else if (action == MouseAction::Release) { - _leftMouseButtonDown = false; - _currentCursorDiff[MouseButtons::ButtonLeft] = glm::vec2(0); - } - } - else if (button == MouseButton::Right){ - if (action == MouseAction::Press){ - _rightMouseButtonDown = true; - _previousCursorPos[MouseButtons::ButtonRight] = OsEng.windowWrapper().mousePosition(); - } - else if (action == MouseAction::Release) { - _rightMouseButtonDown = false; - _currentCursorDiff[MouseButtons::ButtonRight] = glm::vec2(0); - } - } - else if (button == MouseButton::Middle){ - if (action == MouseAction::Press){ - _middleMouseButtonDown = true; - _previousCursorPos[MouseButtons::ButtonMiddle] = OsEng.windowWrapper().mousePosition(); - } - else if (action == MouseAction::Release) { - _middleMouseButtonDown = false; - _currentCursorDiff[MouseButtons::ButtonMiddle] = glm::vec2(0); - } - } - -} - -void OrbitalMouseController::move(float x, float y) { - _currentCursorPos = OsEng.windowWrapper().mousePosition(); - - if (_leftMouseButtonDown) { - glm::vec2 diff = _currentCursorPos - _previousCursorPos[MouseButtons::ButtonLeft]; - glm::vec2 res = OsEng.windowWrapper().currentWindowSize(); - _currentCursorDiff[MouseButtons::ButtonLeft] = diff / res; - } - if (_rightMouseButtonDown) { - glm::vec2 diff = _currentCursorPos - _previousCursorPos[MouseButtons::ButtonRight]; - glm::vec2 res = OsEng.windowWrapper().currentWindowSize(); - _currentCursorDiff[MouseButtons::ButtonRight] = diff / res; - } - if (_middleMouseButtonDown) { - glm::vec2 diff = _currentCursorPos - _previousCursorPos[MouseButtons::ButtonMiddle]; - glm::vec2 res = OsEng.windowWrapper().currentWindowSize(); - _currentCursorDiff[MouseButtons::ButtonMiddle] = diff / res; - } -} - -void OrbitalMouseController::scrollWheel(int pos) { - -} - -void OrbitalMouseController::update(const double& dt){ - /* - const float interactionSpeed = OsEng.interactionHandler().interactionSensitivity(); - const bool rotationInvert = OsEng.interactionHandler().invertRotation(); - const bool rollInvert = OsEng.interactionHandler().invertRoll(); - - //if (_leftMouseButtonDown || _rightMouseButtonDown || _middleMouseButtonDown){ - _handler->orbit( - static_cast(_leftMouseButtonDown) * static_cast(dt) * _currentCursorDiff[MouseButtons::ButtonLeft].x * interactionSpeed * (rotationInvert ? -1.f : 1.f), - static_cast(_leftMouseButtonDown) * static_cast(dt) * _currentCursorDiff[MouseButtons::ButtonLeft].y * interactionSpeed * (rotationInvert ? -1.f : 1.f), - static_cast(_middleMouseButtonDown) * static_cast(dt) * _currentCursorDiff[MouseButtons::ButtonMiddle].x * interactionSpeed * (rollInvert ? -1.f : 1.f), - static_cast(_rightMouseButtonDown) * static_cast(dt) * _currentCursorDiff[MouseButtons::ButtonRight].y * _navigationSpeed); - //} - */ - -// if (_leftMouseButtonDown){ -// _handler->orbit(static_cast(dt)* _currentCursorDiff[MouseButtons::ButtonLeft].x * _rotationSpeed, static_cast(dt)* _currentCursorDiff[MouseButtons::ButtonLeft].y * _rotationSpeed, 0.f); -// } -// if (_middleMouseButtonDown){ -// _handler->orbit(0.f, 0.f, static_cast(dt)* _currentCursorDiff[MouseButtons::ButtonMiddle].x * _rotationSpeed); -// } -// if (_rightMouseButtonDown){ -// _handler->distance(static_cast(dt)* _currentCursorDiff[MouseButtons::ButtonRight].y * _navigationSpeed); -// } -} - -} // namespace interaction -} // namespace openspace - -#endif // USE_OLD_INTERACTIONHANDLER diff --git a/src/query/query.cpp b/src/query/query.cpp index 7d87a9ccbf..224fd7fb1c 100644 --- a/src/query/query.cpp +++ b/src/query/query.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include #include