mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 06:49:32 -05:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user