mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-01 08:19:51 -05:00
Merge branch 'master' into feature/min-max-distance
* Solve conflicts
This commit is contained in:
@@ -91,6 +91,8 @@ public:
|
||||
void keyboardCallback(Key key, KeyModifier modifier, KeyAction action);
|
||||
|
||||
bool disabledKeybindings() const;
|
||||
bool disabledMouse() const;
|
||||
bool disabledJoystick() const;
|
||||
|
||||
void mouseButtonCallback(MouseButton button, MouseAction action);
|
||||
void mousePositionCallback(double x, double y);
|
||||
@@ -138,7 +140,7 @@ public:
|
||||
NavigationState navigationState() const;
|
||||
NavigationState navigationState(const SceneGraphNode& referenceFrame) const;
|
||||
|
||||
void saveNavigationState(const std::string& filepath,
|
||||
void saveNavigationState(const std::filesystem::path& filepath,
|
||||
const std::string& referenceFrameIdentifier);
|
||||
|
||||
void loadNavigationState(const std::string& filepath);
|
||||
|
||||
@@ -72,11 +72,12 @@ public:
|
||||
properties::BoolProperty shouldTriggerWhenIdle;
|
||||
properties::FloatProperty idleWaitTime;
|
||||
properties::BoolProperty abortOnCameraInteraction;
|
||||
properties::FloatProperty speedScale;
|
||||
properties::BoolProperty invert;
|
||||
properties::FloatProperty speedScaleFactor;
|
||||
properties::FloatProperty dampenInterpolationTime;
|
||||
|
||||
properties::OptionProperty defaultBehavior;
|
||||
std::optional<Behavior> chosenBehavior = std::nullopt;
|
||||
std::optional<Behavior> chosenBehavior;
|
||||
};
|
||||
|
||||
OrbitalNavigator();
|
||||
@@ -134,9 +135,18 @@ public:
|
||||
bool hasZoomFriction() const;
|
||||
bool hasRollFriction() const;
|
||||
|
||||
double minAllowedDistance() const;
|
||||
|
||||
glm::dvec3 anchorNodeToCameraVector() const;
|
||||
glm::quat anchorNodeToCameraRotation() const;
|
||||
|
||||
/**
|
||||
* Compute a camera position that pushed the camera position to
|
||||
* a valid position over the anchor node, accounting for the
|
||||
* minimal allowed distance
|
||||
*/
|
||||
glm::dvec3 pushToSurfaceOfAnchor(const glm::dvec3& cameraPosition) const;
|
||||
|
||||
/**
|
||||
* \return The Lua library that contains all Lua functions available to affect the
|
||||
* orbital navigation
|
||||
@@ -187,6 +197,7 @@ private:
|
||||
|
||||
properties::BoolProperty _followAnchorNodeRotation;
|
||||
properties::FloatProperty _followAnchorNodeRotationDistance;
|
||||
properties::BoolProperty _enableMinimumAllowedDistanceLimit;
|
||||
properties::FloatProperty _minimumAllowedDistance;
|
||||
|
||||
struct LimitZoomOut : public properties::PropertyOwner {
|
||||
@@ -206,6 +217,8 @@ private:
|
||||
properties::FloatProperty _stereoscopicDepthOfFocusSurface;
|
||||
properties::FloatProperty _staticViewScaleExponent;
|
||||
|
||||
properties::BoolProperty _constantVelocityFlight;
|
||||
|
||||
properties::FloatProperty _retargetInterpolationTime;
|
||||
properties::FloatProperty _stereoInterpolationTime;
|
||||
properties::FloatProperty _followRotationInterpolationTime;
|
||||
@@ -243,7 +256,7 @@ private:
|
||||
* camera points towards the reference node in the direction opposite to the direction
|
||||
* out from the surface of the object. The local rotation defines the differential
|
||||
* from the global to the current total rotation so that
|
||||
* <code>cameraRotation = globalRotation * localRotation</code>.
|
||||
* `cameraRotation = globalRotation * localRotation`.
|
||||
*/
|
||||
CameraRotationDecomposition decomposeCameraRotationSurface(const CameraPose pose,
|
||||
const SceneGraphNode& reference);
|
||||
@@ -253,7 +266,7 @@ private:
|
||||
* CameraRotationDecomposition. The global rotation defines the rotation so that the
|
||||
* camera points towards the reference position.
|
||||
* The local rotation defines the differential from the global to the current total
|
||||
* rotation so that <code>cameraRotation = globalRotation * localRotation</code>.
|
||||
* rotation so that `cameraRotation = globalRotation * localRotation`.
|
||||
*/
|
||||
CameraRotationDecomposition decomposeCameraRotation(const CameraPose pose,
|
||||
glm::dvec3 reference);
|
||||
@@ -348,13 +361,12 @@ private:
|
||||
/**
|
||||
* Push the camera out to the surface of the object.
|
||||
*
|
||||
* \return a position vector adjusted to be at least minHeightAboveGround meters
|
||||
* \return a position vector adjusted to be at least _minimumAllowedDistance meters
|
||||
* above the actual surface of the object
|
||||
*/
|
||||
glm::dvec3 pushToSurface(double minHeightAboveGround,
|
||||
const glm::dvec3& cameraPosition, const glm::dvec3& objectPosition,
|
||||
const SurfacePositionHandle& positionHandle,
|
||||
std::optional<double> maxHeightAboveGround) const;
|
||||
glm::dvec3 pushToSurface(const glm::dvec3& cameraPosition,
|
||||
const glm::dvec3& objectPosition,
|
||||
const SurfacePositionHandle& positionHandle) const;
|
||||
|
||||
/**
|
||||
* Interpolates between rotationDiff and a 0 rotation.
|
||||
@@ -372,7 +384,7 @@ private:
|
||||
* Calculates a SurfacePositionHandle given a camera position in world space.
|
||||
*/
|
||||
SurfacePositionHandle calculateSurfacePositionHandle(const SceneGraphNode& node,
|
||||
const glm::dvec3 cameraPositionWorldSpace);
|
||||
const glm::dvec3& cameraPositionWorldSpace) const;
|
||||
|
||||
void resetIdleBehavior();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
CameraPose traversePath(double dt, float speedScale = 1.f);
|
||||
|
||||
/**
|
||||
* Function that can be used to permaturely quit a path ,for example when skipping
|
||||
* Function that can be used to permaturely quit a path, for example when skipping
|
||||
* to the end
|
||||
*/
|
||||
void quitPath();
|
||||
|
||||
Reference in New Issue
Block a user