mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 07:19:28 -05:00
Correctly update scale, rotation, and scale classes where multiple subtypes are involved
This commit is contained in:
@@ -81,6 +81,18 @@ TimelineScale::TimelineScale(const ghoul::Dictionary& dictionary)
|
||||
addProperty(_shouldInterpolate);
|
||||
}
|
||||
|
||||
void TimelineScale::update(const UpdateData& data) {
|
||||
const double now = data.time.j2000Seconds();
|
||||
using KeyframePointer = const Keyframe<ghoul::mm_unique_ptr<Scale>>*;
|
||||
|
||||
if (KeyframePointer prev = _timeline.lastKeyframeBefore(now, true); prev) {
|
||||
prev->data->update(data);
|
||||
}
|
||||
if (KeyframePointer next = _timeline.firstKeyframeAfter(now, true); next) {
|
||||
next->data->update(data);
|
||||
}
|
||||
}
|
||||
|
||||
glm::dvec3 TimelineScale::scaleValue(const UpdateData& data) const {
|
||||
const double now = data.time.j2000Seconds();
|
||||
using KeyframePointer = const Keyframe<ghoul::mm_unique_ptr<Scale>>*;
|
||||
|
||||
Reference in New Issue
Block a user