Add list of delta time steps, stepping functions and keybindings

This commit is contained in:
Emma Broman
2020-08-06 11:23:31 +02:00
parent 0b34e32ba7
commit 457dabe9b7
7 changed files with 228 additions and 0 deletions
+1
View File
@@ -151,6 +151,7 @@ private:
std::vector<Property> properties;
std::vector<Keybinding> keybindings;
std::optional<Time> time;
std::vector<std::string> deltaTimes;
std::optional<CameraType> camera;
std::vector<std::string> markNodes;
std::vector<std::string> additionalScripts;
+10
View File
@@ -80,6 +80,9 @@ public:
double deltaTime() const;
bool isPaused() const;
// TEST: delta time steps
void setDeltaTimeSteps(const std::vector<double> deltaTimes);
float defaultTimeInterpolationDuration() const;
float defaultDeltaTimeInterpolationDuration() const;
float defaultPauseInterpolationDuration() const;
@@ -90,6 +93,10 @@ public:
void interpolateDeltaTime(double targetDeltaTime, double durationSeconds);
void interpolatePause(bool pause, double durationSeconds);
// TEST
void interpolateNextDeltaTimeStep(double durationSeconds);
void interpolatePreviousDeltaTimeStep(double durationSeconds);
void addKeyframe(double timestamp, TimeKeyframeData kf);
void removeKeyframesBefore(double timestamp, bool inclusive = false);
void removeKeyframesAfter(double timestamp, bool inclusive = false);
@@ -126,6 +133,9 @@ private:
double _lastDeltaTime = 0.0;
double _lastTargetDeltaTime = 0.0;
// TEST: delta time steps
std::vector<double> _deltaTimeSteps;
properties::FloatProperty _defaultTimeInterpolationDuration;
properties::FloatProperty _defaultDeltaTimeInterpolationDuration;
properties::FloatProperty _defaultPauseInterpolationDuration;