feature/time-refactor (#294)

- Change Time class to become a non-singleton
- Move ownership of the current time to TimeManager(instead of singleton access).
- Store the Time as a Syncable in TimeManager instead of representing all member variables of Time as Syncables.
- Pass a Time object around in the update/render methods, so that renderables don't have to query the OpenSpaceEngine to know if time is paused or if it jumped.
- Introduce Timeline and Keyframe classes
- Make use of Timelineand Keyframeclasses in KeyframeInteractionMode and TimeManager
- Added basic unit tests for Timelineand Keyframe

Future work: Add interpolation schemes for keyframes. Possibly use keyframes+interpolation feature to tween/morph properties, or figure out if this should be a separate mechanism.
This commit is contained in:
Emil Axelsson
2017-05-22 14:01:08 +02:00
committed by GitHub
parent 3a5635d2a8
commit 752081d31b
51 changed files with 745 additions and 453 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ ScriptScheduler::ScheduledScript::ScheduledScript(const ghoul::Dictionary& dicti
: time(-std::numeric_limits<double>::max())
{
std::string timeStr = dictionary.value<std::string>(KeyTime);
time = Time::ref().convertTime(timeStr);
time = Time::convertTime(timeStr);
// If a universal script is specified, retrieve it and add a ; as a separator so that
// it can be added to the other scripts