diff --git a/include/openspace/util/timeline.h b/include/openspace/util/timeline.h index 1a9820d4be..86363f6d5b 100644 --- a/include/openspace/util/timeline.h +++ b/include/openspace/util/timeline.h @@ -32,16 +32,16 @@ namespace openspace { /** -* Base class for keyframes -*/ + * Base class for keyframes + */ struct KeyframeBase { size_t id; double timestamp; }; /** -* Templated class for keyframes containing data -*/ + * Templated class for keyframes containing data + */ template struct Keyframe : public KeyframeBase { Keyframe(size_t i, double t, T d); @@ -54,8 +54,8 @@ struct Keyframe : public KeyframeBase { }; /** -* Templated class for timelines -*/ + * Templated class for timelines + */ template class Timeline { public: @@ -81,28 +81,28 @@ private: }; /** -* Return true if the timestamp of a is smaller the timestamp of b. -*/ + * Return true if the timestamp of a is smaller the timestamp of b. + */ bool compareKeyframeTimes(const KeyframeBase& a, const KeyframeBase& b); /** -* Return true if a is smaller than the timestamp of b. -*/ + * Return true if a is smaller than the timestamp of b. + */ bool compareTimeWithKeyframeTime(double a, const KeyframeBase& b); /** -* Return true if the timestamp of a is smaller than b. -*/ + * Return true if the timestamp of a is smaller than b. + */ bool compareKeyframeTimeWithTime(const KeyframeBase& a, double b); /** -* Return true if the timestamp of a is smaller than or equal to b. -* This is used only in the mode of saving render frames during session recording -* playback. This was necessary to correct a small timing issue caused by fixing -* the application time according to the playback framerate. In normal operation, -* the application time at the instant the keyframes are evaluated is always a -* little bit newer than the first keyframe in the timeline. -*/ + * Return true if the timestamp of a is smaller than or equal to b. + * This is used only in the mode of saving render frames during session recording + * playback. This was necessary to correct a small timing issue caused by fixing + * the application time according to the playback framerate. In normal operation, + * the application time at the instant the keyframes are evaluated is always a + * little bit newer than the first keyframe in the timeline. + */ bool compareKeyframeTimeWithTime_playbackWithFrames(const KeyframeBase& a, double b); } // namespace openspace diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 8dd838f449..ac65118e80 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -1178,13 +1178,11 @@ double SessionRecording::fixedDeltaTimeDuringFrameOutput() const { } std::chrono::steady_clock::time_point -SessionRecording::currentPlaybackInterpolationTime() const -{ +SessionRecording::currentPlaybackInterpolationTime() const { return _saveRenderingCurrentRecordedTime_interpolation; } -double SessionRecording::currentApplicationInterpolationTime() const -{ +double SessionRecording::currentApplicationInterpolationTime() const { return _saveRenderingCurrentApplicationTime_interpolation; } diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 786b652d67..0ecbe18f32 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -474,8 +474,7 @@ SceneGraphNode* Scene::loadNode(const ghoul::Dictionary& nodeDictionary) { return rawNodePointer; } -std::chrono::steady_clock::time_point Scene::currentTimeForInterpolation() -{ +std::chrono::steady_clock::time_point Scene::currentTimeForInterpolation() { if (global::sessionRecording->isSavingFramesDuringPlayback()) { return global::sessionRecording->currentPlaybackInterpolationTime(); } diff --git a/src/util/timemanager.cpp b/src/util/timemanager.cpp index ceb192313f..e97cdc80b6 100644 --- a/src/util/timemanager.cpp +++ b/src/util/timemanager.cpp @@ -843,8 +843,7 @@ void TimeManager::interpolatePause(bool pause, double interpolationDuration) { addKeyframe(now + interpolationDuration, futureKeyframe); } -double TimeManager::currentApplicationTimeForInterpolation() const -{ +double TimeManager::currentApplicationTimeForInterpolation() const { if (global::sessionRecording->isSavingFramesDuringPlayback()) { return global::sessionRecording->currentApplicationInterpolationTime(); } @@ -853,8 +852,7 @@ double TimeManager::currentApplicationTimeForInterpolation() const } } -double TimeManager::previousApplicationTimeForInterpolation() const -{ +double TimeManager::previousApplicationTimeForInterpolation() const { //If playing back with frames, this function needs to be called when a time rate // interpolation (either speed change or pause) begins and ends. If the application // time of the interpolation keyframe timestamp (when it was added to timeline) is