mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-25 06:19:02 -06:00
Fix wrong order of path type enum, and make it enum class
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<int>(Path::Type::AvoidCollision), "AvoidCollision" },
|
||||
{ static_cast<int>(Path::Type::ZoomOutOverview), "ZoomOutOverview" },
|
||||
{ static_cast<int>(Path::Type::Linear), "Linear" },
|
||||
{ static_cast<int>(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<Path::Type>(_defaultPathType.value());
|
||||
}
|
||||
|
||||
double PathNavigator::minValidBoundingSphere() const {
|
||||
|
||||
Reference in New Issue
Block a user