Rename curve type to path type

And clarify documentation a little. "Path type" makes more sense to a user, who is never actually exposed to the concept of curves
This commit is contained in:
Emma Broman
2021-08-16 12:59:00 +02:00
parent a39dcf2567
commit 5d11af00dc
4 changed files with 46 additions and 43 deletions
+8 -5
View File
@@ -39,7 +39,7 @@ namespace openspace::interaction {
class Path {
public:
enum CurveType {
enum Type {
AvoidCollision,
Linear,
ZoomOutOverview,
@@ -51,7 +51,7 @@ public:
// doesn't introduce sudden large changes in rotation
};
Path(Waypoint start, Waypoint end, CurveType type,
Path(Waypoint start, Waypoint end, Type type,
std::optional<double> duration = std::nullopt);
Waypoint startPoint() const;
@@ -129,7 +129,7 @@ private:
Waypoint _start;
Waypoint _end;
double _duration; // seconds
CurveType _curveType;
Type _type;
std::unique_ptr<PathCurve> _curve;
@@ -140,8 +140,11 @@ private:
double _progressedTime = 0.0; // Time since playback started
};
Path createPathFromDictionary(const ghoul::Dictionary& dictionary,
Path::CurveType curveType);
// Create a path of the given type based on an instruction given as a dictionary.
// See top of cpp file for documentation on keys and values for the dictionary.
// Returns the created path.
Path createPathFromDictionary(const ghoul::Dictionary& dictionary, Path::Type type);
} // namespace openspace::interaction
+1 -1
View File
@@ -91,7 +91,7 @@ private:
std::unique_ptr<Path> _currentPath = nullptr;
bool _isPlaying = false;
properties::OptionProperty _defaultCurveOption;
properties::OptionProperty _defaultPathType;
properties::BoolProperty _includeRoll;
properties::FloatProperty _speedScale;
properties::BoolProperty _applyIdleBehaviorOnFinish;