diff --git a/include/openspace/navigation/path.h b/include/openspace/navigation/path.h index 17aa20c690..e3de95defd 100644 --- a/include/openspace/navigation/path.h +++ b/include/openspace/navigation/path.h @@ -39,10 +39,10 @@ namespace openspace::interaction { class Path { public: - enum Type { - AvoidCollision, - Linear, + enum class Type { + AvoidCollision = 0, ZoomOutOverview, + Linear, AvoidCollisionWithLookAt // @TODO (2021-08-13, emmbr) This type right now leads // to rapid rotations, but is useful in specific // scenarios, e.g. close to surfaces. Later we want to diff --git a/src/navigation/pathnavigator.cpp b/src/navigation/pathnavigator.cpp index 98e74dca57..81148164b1 100644 --- a/src/navigation/pathnavigator.cpp +++ b/src/navigation/pathnavigator.cpp @@ -123,10 +123,10 @@ PathNavigator::PathNavigator() , _relevantNodeTags(RelevantNodeTagsInfo) { _defaultPathType.addOptions({ - { Path::Type::AvoidCollision, "AvoidCollision" }, - { Path::Type::ZoomOutOverview, "ZoomOutOverview"}, - { Path::Type::Linear, "Linear" }, - { Path::Type::AvoidCollisionWithLookAt, "AvoidCollisionWithLookAt"} + { static_cast(Path::Type::AvoidCollision), "AvoidCollision" }, + { static_cast(Path::Type::ZoomOutOverview), "ZoomOutOverview" }, + { static_cast(Path::Type::Linear), "Linear" }, + { static_cast(Path::Type::AvoidCollisionWithLookAt), "AvoidCollisionWithLookAt"} }); addProperty(_defaultPathType); @@ -343,8 +343,7 @@ void PathNavigator::continuePath() { } Path::Type PathNavigator::defaultPathType() const { - const int pathType = _defaultPathType; - return Path::Type(pathType); + return static_cast(_defaultPathType.value()); } double PathNavigator::minValidBoundingSphere() const {