Feature/time interpolation (#669)

* Initial implementation
* Better approximation of target time
* Correctly use double precision for time passing
* Cleanup
* Adding proportional adjustment of delta time at end of interpolation
* Keyframe based time interpolation
* Add property for time interpolation duration. Move time interpolation methods to TimeManager.
* Fix bugs with time gui
* Make several clicks on delta time buttons work as expected
* Clean up
* Improve time interpolation for parallel connection
* Improve time API. Fix time interpolation bugs.
* Fix mac compile issue
* Add hour button
* Add missing + sign
* Remove newer images from projection buffer when going back in time
* Add comment about clearing projection buffer
* Fix bug with jumping time in parallel connection
* Rename integrateFromTime to previousFrameTime
* Compile fix for iswa module
* Address code review comments
* Code cleanup
* Fix bug causig unsmooth behaviour when pausing while interpolating in time
This commit is contained in:
Emil Axelsson
2018-07-13 11:07:35 +02:00
committed by GitHub
parent 6007f1d70d
commit 902e3e6dac
42 changed files with 1465 additions and 586 deletions

View File

@@ -29,6 +29,7 @@
#include <openspace/properties/property.h>
#include <openspace/query/query.h>
#include <openspace/util/timemanager.h>
#include <openspace/util/time.h>
#include <ghoul/logging/logmanager.h>
namespace {
@@ -46,7 +47,9 @@ void SetPropertyTopic::handleJson(const nlohmann::json& json) {
std::string value = json.at(ValueKey).get<std::string>();
if (propertyKey == SpecialKeyTime) {
OsEng.timeManager().time().setTime(std::move(value));
Time newTime;
newTime.setTime(value);
OsEng.timeManager().setTimeNextFrame(newTime);
}
else {
properties::Property* prop = property(propertyKey);

View File

@@ -108,7 +108,7 @@ json TimeTopic::currentTime() {
}
json TimeTopic::deltaTime() {
json timeJson = { { "deltaTime", OsEng.timeManager().time().deltaTime() } };
json timeJson = { { "deltaTime", OsEng.timeManager().deltaTime() } };
return wrappedPayload(timeJson);
}