mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 10:28:44 -05:00
Remove bounce mode for video playback
This commit is contained in:
@@ -70,9 +70,7 @@ namespace {
|
||||
enum class AnimationMode {
|
||||
MapToSimulationTime = 0,
|
||||
RealTimeLoopFromStart,
|
||||
RealTimeLoopInfinitely,
|
||||
RealTimeBounceFromStart,
|
||||
RealTimeBounceInfinitely
|
||||
RealTimeLoopInfinitely
|
||||
};
|
||||
|
||||
// The mode of how the animation should be played back.
|
||||
@@ -143,12 +141,6 @@ FfmpegTileProvider::FfmpegTileProvider(const ghoul::Dictionary& dictionary) {
|
||||
case Parameters::AnimationMode::RealTimeLoopInfinitely:
|
||||
_animationMode = AnimationMode::RealTimeLoopInfinitely;
|
||||
break;
|
||||
case Parameters::AnimationMode::RealTimeBounceFromStart:
|
||||
_animationMode = AnimationMode::RealTimeBounceFromStart;
|
||||
break;
|
||||
case Parameters::AnimationMode::RealTimeBounceInfinitely:
|
||||
_animationMode = AnimationMode::RealTimeBounceInfinitely;
|
||||
break;
|
||||
case Parameters::AnimationMode::MapToSimulationTime:
|
||||
_animationMode = AnimationMode::MapToSimulationTime;
|
||||
break;
|
||||
@@ -303,20 +295,6 @@ void FfmpegTileProvider::update() {
|
||||
fmod(now - _startJ200Time, 2 * _videoDuration) - _videoDuration
|
||||
);
|
||||
break;
|
||||
case AnimationMode::RealTimeBounceFromStart: {
|
||||
double modulo = fmod(now - _startJ200Time, 2 * _videoDuration);
|
||||
if (modulo < 0.0) {
|
||||
modulo += 2 * _videoDuration;
|
||||
}
|
||||
videoTime = _videoDuration - abs(modulo - _videoDuration);
|
||||
break;
|
||||
}
|
||||
case AnimationMode::RealTimeBounceInfinitely:
|
||||
videoTime = now - _startJ200Time;
|
||||
if (videoTime > _videoDuration) {
|
||||
videoTime = _videoDuration;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
|
||||
@@ -67,9 +67,7 @@ private:
|
||||
enum class AnimationMode {
|
||||
MapToSimulationTime = 0,
|
||||
RealTimeLoopFromStart,
|
||||
RealTimeLoopInfinitely,
|
||||
RealTimeBounceFromStart,
|
||||
RealTimeBounceInfinitely
|
||||
RealTimeLoopInfinitely
|
||||
};
|
||||
|
||||
AnimationMode _animationMode = AnimationMode::MapToSimulationTime;
|
||||
|
||||
Reference in New Issue
Block a user