Issue/3016 - Settings for jumpTo (#3080)

* Add script for jumpTo scene graph node and navigation state

* Add property to control how long the fading takes (navigation handler)

* Update GUI hash

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Emma Broman
2024-04-04 10:20:24 +02:00
committed by GitHub
parent c47eb8fc7a
commit a82af895d7
6 changed files with 134 additions and 2 deletions

View File

@@ -85,7 +85,9 @@ public:
OrbitalNavigator& orbitalNavigator();
KeyframeNavigator& keyframeNavigator();
PathNavigator& pathNavigator();
bool isKeyFrameInteractionEnabled() const;
float jumpToFadeDuration() const;
float interpolationTime() const;
// Callback functions
@@ -165,6 +167,18 @@ public:
*/
void setCameraFromNodeSpecNextFrame(NodeCameraStateSpec spec);
/**
* Trigger a transition script after first fading out the rendering, and fading in
* the rendering when the script is finished. One example use case could be to fade
* out, move the camera to another focus node, and then fade in
*
* \param transitionScript The Lua script to handle the transition. Can be anything
* \param fadeDuration An optional duration for the fading. If unspecified, use the
* JumpToFadeDuration property
*/
void triggerFadeToTransition(const std::string& transitionScript,
std::optional<float> fadeDuration = std::nullopt);
/**
* \return The Lua library that contains all Lua functions available to affect the
* interaction
@@ -195,6 +209,7 @@ private:
properties::BoolProperty _disableMouseInputs;
properties::BoolProperty _disableJoystickInputs;
properties::BoolProperty _useKeyFrameInteraction;
properties::FloatProperty _jumpToFadeDuration;
};
} // namespace openspace::interaction