mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 12:59:07 -06:00
Set default values for starting time and start camera (closes #1981)
This commit is contained in:
@@ -1659,8 +1659,14 @@ void OpenSpaceEngine::removeModeChangeCallback(CallbackHandle handle) {
|
||||
|
||||
void setCameraFromProfile(const Profile& p) {
|
||||
if (!p.camera.has_value()) {
|
||||
throw ghoul::RuntimeError("No 'camera' entry exists in the startup profile");
|
||||
// If the camera is not specified, we want to set it to a sensible default value
|
||||
interaction::NavigationState nav;
|
||||
nav.anchor = "Root";
|
||||
nav.referenceFrame = "Root";
|
||||
global::navigationHandler->setNavigationStateNextFrame(nav);
|
||||
return;
|
||||
}
|
||||
|
||||
std::visit(
|
||||
overloaded{
|
||||
[](const Profile::CameraNavState& navStateProfile) {
|
||||
|
||||
Reference in New Issue
Block a user