Compute a fractional animation step for every frame.

This step is used to interpolate animations.
This commit is contained in:
2018-02-13 11:09:04 +01:00
parent 74cf511436
commit c033f08d04
2 changed files with 22 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ struct
vector<vector<LayerData>>::iterator currentData;
vector<unique_ptr<LayerVisualisation>> layerVisualisations;
vector<unique_ptr<ActivityAnimation>> animations;
float animationStep = 0;
} rendererData;
static void loadSimulationData(const Options &options)
@@ -153,6 +154,7 @@ static void idleFunc()
checkGLErrors();
glutPostRedisplay();
throttleIdleFunc();
rendererData.animationStep = getAnimationStep(std::chrono::seconds(5));
}
int main(int argc, char *argv[])