Interpolate stereoscopic depth when changing focus node

This commit is contained in:
Emil Axelsson
2018-02-16 13:52:42 +01:00
parent 656bd0e89e
commit 954e3a888d
2 changed files with 83 additions and 18 deletions
@@ -88,13 +88,18 @@ private:
properties::FloatProperty _stereoscopicDepthOfFocusSurface;
properties::FloatProperty _staticViewScaleExponent;
properties::FloatProperty _rotateToFocusInterpolationTime;
properties::FloatProperty _stereoInterpolationTime;
MouseStates _mouseStates;
SceneGraphNode* _focusNode = nullptr;
glm::dvec3 _previousFocusNodePosition;
glm::dquat _previousFocusNodeRotation;
double _currentCameraToSurfaceDistance;
Interpolator<double> _rotateToFocusNodeInterpolator;
Interpolator<double> _cameraToSurfaceDistanceInterpolator;
Interpolator<double> _followRotationInterpolator;
/**
@@ -129,6 +134,11 @@ private:
glm::dquat interpolateLocalRotation(double deltaTime,
const glm::dquat& localCameraRotation);
double interpolateCameraToSurfaceDistance(double deltaTime,
double currentDistance,
double targetDistance);
/**
* Translates the horizontal direction. If far from the focus object, this will
* result in an orbital rotation around the object. This function does not affect the