mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-13 17:09:05 -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:
@@ -892,16 +892,20 @@ void RenderableFov::render(const RenderData& data, RendererTasks&) {
|
||||
void RenderableFov::update(const UpdateData& data) {
|
||||
_drawFOV = false;
|
||||
if (openspace::ImageSequencer::ref().isReady()) {
|
||||
_drawFOV = ImageSequencer::ref().isInstrumentActive(_instrument.name);
|
||||
_drawFOV = ImageSequencer::ref().isInstrumentActive(
|
||||
data.time.j2000Seconds(),
|
||||
_instrument.name
|
||||
);
|
||||
}
|
||||
|
||||
if (_drawFOV && !data.time.paused()) {
|
||||
// TODO: figure out if time has changed
|
||||
if (_drawFOV /* && time changed */) {
|
||||
const std::pair<std::string,bool>& t = determineTarget(data.time.j2000Seconds());
|
||||
|
||||
computeIntercepts(data, t.first, t.second);
|
||||
updateGPU();
|
||||
|
||||
const double t2 = (ImageSequencer::ref().nextCaptureTime());
|
||||
const double t2 = (ImageSequencer::ref().nextCaptureTime(data.time.j2000Seconds()));
|
||||
const double diff = (t2 - data.time.j2000Seconds());
|
||||
_interpolationTime = 0.f;
|
||||
const float interpolationStart = 7.f; //seconds before
|
||||
|
||||
Reference in New Issue
Block a user