mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Some clean up
This commit is contained in:
@@ -50,8 +50,6 @@ namespace openspace {
|
||||
struct SurfacePositionHandle;
|
||||
} // namespace
|
||||
|
||||
namespace openspace::scripting { struct LuaLibrary; }
|
||||
|
||||
namespace openspace::interaction {
|
||||
|
||||
class MouseInputState;
|
||||
@@ -113,10 +111,6 @@ public:
|
||||
void setRetargetInterpolationTime(float durationInSeconds);
|
||||
void updatePreviousStateVariables();
|
||||
|
||||
void setMinimumAllowedDistance(float distance);
|
||||
void setMaximumAllowedDistance(double distance);
|
||||
void setEnableZoomOutLimit(bool value);
|
||||
|
||||
JoystickCameraStates& joystickStates();
|
||||
const JoystickCameraStates& joystickStates() const;
|
||||
|
||||
@@ -138,12 +132,6 @@ public:
|
||||
glm::dvec3 anchorNodeToCameraVector() const;
|
||||
glm::quat anchorNodeToCameraRotation() const;
|
||||
|
||||
/**
|
||||
* \return The Lua library that contains all Lua functions available to affect the
|
||||
* orbital navigation
|
||||
*/
|
||||
static scripting::LuaLibrary luaLibrary();
|
||||
|
||||
private:
|
||||
struct CameraRotationDecomposition {
|
||||
glm::dquat localRotation = glm::dquat(1.0, 0.0, 0.0, 0.0);
|
||||
|
||||
@@ -73,7 +73,6 @@ set(OPENSPACE_SOURCE
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/navigationhandler_lua.inl
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/navigationstate.cpp
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/orbitalnavigator.cpp
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/orbitalnavigator_lua.inl
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/path.cpp
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/pathcurve.cpp
|
||||
${OPENSPACE_BASE_DIR}/src/navigation/pathnavigator.cpp
|
||||
|
||||
@@ -91,7 +91,6 @@ void registerCoreClasses(scripting::ScriptEngine& engine) {
|
||||
engine.addLibrary(interaction::ActionManager::luaLibrary());
|
||||
engine.addLibrary(interaction::KeybindingManager::luaLibrary());
|
||||
engine.addLibrary(interaction::NavigationHandler::luaLibrary());
|
||||
engine.addLibrary(interaction::OrbitalNavigator::luaLibrary());
|
||||
engine.addLibrary(interaction::PathNavigator::luaLibrary());
|
||||
engine.addLibrary(interaction::SessionRecording::luaLibrary());
|
||||
engine.addLibrary(scripting::ScriptScheduler::luaLibrary());
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
#include <glm/gtx/vector_angle.hpp>
|
||||
#include <cmath>
|
||||
|
||||
#include "orbitalnavigator_lua.inl"
|
||||
|
||||
namespace {
|
||||
constexpr std::string_view _loggerCat = "OrbitalNavigator";
|
||||
|
||||
@@ -924,28 +922,6 @@ void OrbitalNavigator::updatePreviousStateVariables() {
|
||||
updatePreviousAimState();
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setMinimumAllowedDistance(float distance) {
|
||||
if (_limitZoomOut.isEnabled && distance > _limitZoomOut.maximumAllowedDistance) {
|
||||
LWARNING("Setting minumum allowed distance larger than maximum allowed distance");
|
||||
}
|
||||
|
||||
_minimumAllowedDistance = distance;
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setMaximumAllowedDistance(double distance) {
|
||||
if (_minimumAllowedDistance > distance) {
|
||||
LWARNING(
|
||||
"Setting maximum allowed distance smaller than minumum allowed distance"
|
||||
);
|
||||
}
|
||||
|
||||
_limitZoomOut.maximumAllowedDistance = distance;
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setEnableZoomOutLimit(bool value) {
|
||||
_limitZoomOut.isEnabled = value;
|
||||
}
|
||||
|
||||
void OrbitalNavigator::startRetargetAnchor() {
|
||||
if (!_anchorNode) {
|
||||
return;
|
||||
@@ -1792,15 +1768,4 @@ void OrbitalNavigator::orbitAroundAxis(const glm::dvec3 axis, double deltaTime,
|
||||
globalRotation = spinRotation * globalRotation;
|
||||
}
|
||||
|
||||
scripting::LuaLibrary OrbitalNavigator::luaLibrary() {
|
||||
return {
|
||||
"orbitalnavigation",
|
||||
{
|
||||
codegen::lua::SetRelativeMinDistance,
|
||||
codegen::lua::SetRelativeMaxDistance,
|
||||
codegen::lua::EnableZoomOutLimit
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace openspace::interaction
|
||||
|
||||
Reference in New Issue
Block a user