Simplify curve type handling using properties (Temporary solution)

This commit is contained in:
Emma Broman
2020-02-26 10:52:37 -05:00
parent 6ec519b0ca
commit 0db62b740c
5 changed files with 22 additions and 48 deletions
@@ -34,7 +34,6 @@ namespace {
constexpr const char* KeyInstructions = "Instructions";
constexpr const char* KeyStopAtTargets = "StopAtTargets";
constexpr const char* KeyStartState = "StartState";
constexpr const char* KeyCurveType = "CurveType";
} // namespace
@@ -67,11 +66,6 @@ PathSpecification::PathSpecification(const ghoul::Dictionary& dictionary) {
_stopAtTargets = dictionary.value<bool>(KeyStopAtTargets);
}
// Read desired curve type
if (dictionary.hasValue<std::string>(KeyCurveType)) {
_curveType = dictionary.value<std::string>(KeyCurveType);
}
// Read start state
if (dictionary.hasValue<ghoul::Dictionary>(KeyStartState)) {
auto navStateDict = dictionary.value<ghoul::Dictionary>(KeyStartState);
@@ -105,10 +99,6 @@ const bool PathSpecification::stopAtTargets() const {
return _stopAtTargets;
}
const std::string& PathSpecification::curveType() const {
return _curveType;
}
const interaction::NavigationHandler::NavigationState& PathSpecification::startState() const {
return _startState.value();
}
@@ -142,12 +132,6 @@ documentation::Documentation PathSpecification::Documentation() {
Optional::Yes,
"A navigation state that determines the start state for the camera path."
},
{
KeyCurveType,
new StringVerifier,
Optional::Yes,
"A string describing one of the available curve types (TODO: refer to later documentation)."
},
}
};
}