-
Notifications
You must be signed in to change notification settings - Fork 70
Abstract Trajectory #1289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstract Trajectory #1289
Conversation
physics/continuous_trajectory.hpp
Outdated
Hint* hint) const; | ||
// Implementation of the interface |Trajectory|. | ||
|
||
using TrajectoryHint = Trajectory<Frame>::Hint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this name, I'd rather have Trajectory<Frame>::Hint
in the few places where it's used.
CHECK(it != series_.end()); | ||
if (hint != nullptr) { | ||
hint->index_ = it - series_.cbegin(); | ||
Trajectory<Frame>::Hint* const hint) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See? Trajectory<Frame>::Hint
is much better than TrajectoryHint
.
physics/trajectory.hpp
Outdated
virtual Instant t_max() const = 0; | ||
|
||
// Gets a |Hint| of the appropriate derived type. | ||
virtual not_null<std::unique_ptr<Hint>> GetHint() const = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call this NewHint
, it makes it clearer that this is a factory. Otherwise one is left wondering where it "gets" it from.
retest this please |
Two interfaces.