mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-01 09:08:49 -06:00
Started switching OpenSpace projects to nested namespaces
Various cleanups
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -30,8 +30,7 @@
|
||||
#include <ghoul/glm.h>
|
||||
#include <glm/gtx/vector_angle.hpp>
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
class NavigationHandler;
|
||||
|
||||
@@ -47,7 +46,6 @@ protected:
|
||||
NavigationHandler* _handler;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___CONTROLLER___H__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -25,8 +25,7 @@
|
||||
#ifndef __OPENSPACE_CORE___DELAYEDVARIABLE___H__
|
||||
#define __OPENSPACE_CORE___DELAYEDVARIABLE___H__
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
/**
|
||||
* Class that acts as a smoothing filter to a variable. The filter has a step
|
||||
@@ -51,8 +50,7 @@ private:
|
||||
T _currentValue;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#include "delayedvariable.inl"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -25,8 +25,7 @@
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <ghoul/glm.h>
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
template <typename T, typename ScaleType>
|
||||
DelayedVariable<T, ScaleType>::DelayedVariable(ScaleType scaleFactor, ScaleType friction)
|
||||
@@ -72,5 +71,4 @@ T DelayedVariable<T, ScaleType>::get() const {
|
||||
return _currentValue;
|
||||
}
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
class InputState {
|
||||
public:
|
||||
@@ -64,7 +63,6 @@ private:
|
||||
double _mouseScrollDelta;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___INPUTSTATE___H__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
/*
|
||||
* Interpolates a typename T using a transfer function.
|
||||
@@ -44,7 +43,7 @@ public:
|
||||
void setDeltaTime(float deltaTime);
|
||||
void setTransferFunction(std::function<T(float)> transferFunction);
|
||||
void setInterpolationTime(float interpolationTime);
|
||||
void step();
|
||||
void step();
|
||||
|
||||
float deltaTimeScaled() const;
|
||||
T value() const;
|
||||
@@ -57,8 +56,7 @@ private:
|
||||
float _scaledDeltaTime;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#include "interpolator.inl"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -26,8 +26,7 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
template <typename T>
|
||||
Interpolator<T>::Interpolator()
|
||||
@@ -81,5 +80,4 @@ bool Interpolator<T>::isInterpolating() const {
|
||||
return _t < 1.0 && _t >= 0.0;
|
||||
}
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -32,14 +32,13 @@
|
||||
#include <ghoul/misc/boolean.h>
|
||||
|
||||
namespace openspace {
|
||||
class Camera;
|
||||
class SceneGraphNode;
|
||||
} // namespace
|
||||
|
||||
class Camera;
|
||||
class SceneGraphNode;
|
||||
namespace openspace::interaction {
|
||||
|
||||
namespace interaction {
|
||||
|
||||
class KeyBindingManager : public DocumentationGenerator
|
||||
{
|
||||
class KeyBindingManager : public DocumentationGenerator {
|
||||
public:
|
||||
KeyBindingManager();
|
||||
~KeyBindingManager() = default;
|
||||
@@ -81,7 +80,6 @@ private:
|
||||
std::multimap<KeyWithModifier, KeyInformation> _keyLua;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___KEYBINDINGMANAGER___H__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -31,14 +31,11 @@
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtx/quaternion.hpp>
|
||||
|
||||
namespace openspace {
|
||||
namespace openspace { class Camera; }
|
||||
|
||||
class Camera;
|
||||
namespace openspace::interaction {
|
||||
|
||||
namespace interaction {
|
||||
|
||||
class KeyframeNavigator
|
||||
{
|
||||
class KeyframeNavigator {
|
||||
public:
|
||||
struct CameraPose {
|
||||
glm::dvec3 position;
|
||||
@@ -63,7 +60,6 @@ private:
|
||||
Timeline<CameraPose> _cameraPoseTimeline;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___KEYFRAMENAVIGATOR___H__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -35,11 +35,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ghoul {
|
||||
namespace opengl {
|
||||
class ProgramObject;
|
||||
} // namespace opengl
|
||||
} // namespace ghoul
|
||||
namespace ghoul::opengl { class ProgramObject; }
|
||||
|
||||
namespace openspace {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -30,8 +30,7 @@
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
namespace openspace {
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
struct MouseState {
|
||||
MouseState(double scaleFactor);
|
||||
@@ -42,14 +41,13 @@ struct MouseState {
|
||||
DelayedVariable<glm::dvec2, double> velocity;
|
||||
};
|
||||
|
||||
class MouseStates
|
||||
{
|
||||
class MouseStates {
|
||||
public:
|
||||
/**
|
||||
\param sensitivity
|
||||
\param velocityScaleFactor can be set to 60 to remove the inertia of the
|
||||
interaction. Lower value will make it harder to move the camera.
|
||||
*/
|
||||
* \param sensitivity
|
||||
* \param velocityScaleFactor can be set to 60 to remove the inertia of the
|
||||
* interaction. Lower value will make it harder to move the camera.
|
||||
*/
|
||||
MouseStates(double sensitivity, double velocityScaleFactor);
|
||||
void updateMouseStatesFromInput(const InputState& inputState, double deltaTime);
|
||||
void setRotationalFriction(double friction);
|
||||
@@ -74,7 +72,6 @@ private:
|
||||
MouseState _globalRollMouseState;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___MOUSESTATE___H__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -38,11 +38,11 @@
|
||||
#include <ghoul/misc/boolean.h>
|
||||
|
||||
namespace openspace {
|
||||
class Camera;
|
||||
class SceneGraphNode;
|
||||
} // namespace openspace
|
||||
|
||||
class Camera;
|
||||
class SceneGraphNode;
|
||||
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
class NavigationHandler : public properties::PropertyOwner {
|
||||
public:
|
||||
@@ -85,6 +85,7 @@ public:
|
||||
* interaction
|
||||
*/
|
||||
static scripting::LuaLibrary luaLibrary();
|
||||
|
||||
private:
|
||||
bool _cameraUpdatedFromScript = false;
|
||||
|
||||
@@ -99,7 +100,6 @@ private:
|
||||
properties::BoolProperty _useKeyFrameInteraction;
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___NAVIGATIONHANDLER___H__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*****************************************************************************************
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
@@ -38,12 +38,12 @@
|
||||
#include <glm/gtx/quaternion.hpp>
|
||||
|
||||
namespace openspace {
|
||||
class SceneGraphNode;
|
||||
class Camera;
|
||||
struct SurfacePositionHandle;
|
||||
} // namespace
|
||||
|
||||
class SceneGraphNode;
|
||||
class Camera;
|
||||
struct SurfacePositionHandle;
|
||||
|
||||
namespace interaction {
|
||||
namespace openspace::interaction {
|
||||
|
||||
class OrbitalNavigator : public properties::PropertyOwner {
|
||||
public:
|
||||
@@ -191,7 +191,6 @@ private:
|
||||
const glm::dvec3 cameraPositionWorldSpace);
|
||||
};
|
||||
|
||||
} // namespace interaction
|
||||
} // namespace openspace
|
||||
} // namespace openspace::interaction
|
||||
|
||||
#endif // __OPENSPACE_CORE___ORBITALNAVIGATOR___H__
|
||||
|
||||
Reference in New Issue
Block a user