mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-26 14:58:51 -06:00
Eliminate duplicate frames at time transitions when saving screenshot frames during playback
This commit is contained in:
@@ -95,6 +95,16 @@ bool compareTimeWithKeyframeTime(double a, const KeyframeBase& 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.
|
||||
*/
|
||||
bool compareKeyframeTimeWithTime_playbackWithFrames(const KeyframeBase& a, double b);
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
#include "timeline.inl"
|
||||
|
||||
@@ -121,13 +121,14 @@ public:
|
||||
|
||||
private:
|
||||
void progressTime(double dt);
|
||||
void applyKeyframeData(const TimeKeyframeData& keyframe);
|
||||
void applyKeyframeData(const TimeKeyframeData& keyframe, double dt);
|
||||
TimeKeyframeData interpolate(const Keyframe<TimeKeyframeData>& past,
|
||||
const Keyframe<TimeKeyframeData>& future, double time);
|
||||
|
||||
void addDeltaTimesKeybindings();
|
||||
void clearDeltaTimesKeybindings();
|
||||
double currentApplicationTimeForInterpolation() const;
|
||||
double previousApplicationTimeForInterpolation() const;
|
||||
|
||||
Timeline<TimeKeyframeData> _timeline;
|
||||
SyncData<Time> _currentTime;
|
||||
@@ -140,6 +141,7 @@ private:
|
||||
bool _lastTimePaused = false;
|
||||
double _lastDeltaTime = 0.0;
|
||||
double _lastTargetDeltaTime = 0.0;
|
||||
double _previousApplicationTime = 0.0;
|
||||
|
||||
bool _deltaTimeStepsChanged = false;
|
||||
std::vector<double> _deltaTimeSteps;
|
||||
|
||||
Reference in New Issue
Block a user