mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-14 01:10:11 -05:00
Early out if simulation not paused. Also, temporary pause on play, for testing
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <openspace/interaction/navigationhandler.h>
|
||||
#include <openspace/scene/scenegraphnode.h>
|
||||
#include <openspace/util/camera.h>
|
||||
#include <openspace/util/timemanager.h>
|
||||
#include <openspace/query/query.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <glm/gtx/vector_angle.hpp>
|
||||
@@ -104,8 +105,6 @@ void AutoNavigationHandler::updateCamera(double deltaTime) {
|
||||
|
||||
if (!_isPlaying || _pathSegments.empty()) return;
|
||||
|
||||
//TODO: early out if simulation time is not stopped.
|
||||
|
||||
PathSegment currentSegment = _pathSegments[_currentSegmentIndex];
|
||||
|
||||
// compute interpolated camera state
|
||||
@@ -193,6 +192,16 @@ void AutoNavigationHandler::startPath() {
|
||||
LERROR("Cannot start an empty path.");
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: remove this line at the end of our project. Used to simplify testing
|
||||
global::timeManager.setPause(true);
|
||||
|
||||
//OBS! Until we can handle simulation time: early out if not paused
|
||||
if (!global::timeManager.isPaused()) {
|
||||
LERROR("Simulation time must be paused to run a camera path.");
|
||||
return;
|
||||
}
|
||||
|
||||
LINFO("Starting path...");
|
||||
_currentTime = 0.0;
|
||||
_isPlaying = true;
|
||||
|
||||
Reference in New Issue
Block a user