mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-08 22:38:42 -05:00
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user