Go to the documentation of this file.
60 void update(
float time,
bool ignoreEmptyTracks =
false);
77 std::map<TrackID, VariantTrack> tracks;
88 template <
typename ValueT>
93 v = std::get<ValueT>(
value);
std::variant< float, Eigen::MatrixXf, Eigen::Quaternionf > VariantValue
Variant for trajectory values.
A keyframe, representing a value at a given time.
A track represents the timeline of a single value, identified by a track ID.
VariantTrack & operator[](const TrackID &id)
Get the track with the given ID.
std::string TrackID
ID of tracks.
void update(float time, bool ignoreEmptyTracks=false)
Update all tracks for the given time.
VariantTrack::UpdateFunc toUpdateFunc(std::function< void(float)> func)
Wrap the function in a Track::UpdateFunc.
std::function< void(ValueT)> UpdateFunc
The update function type.
VariantTrack & addTrack(const TrackID &id)
Add track with the given ID (and no update function).
friend std::ostream & operator<<(std::ostream &os, const Trajectory &trajectory)
std::shared_ptr< Value > value()
VariantTrack::UpdateFunc updateValue(ValueT &v)
Get an update function for value assignments.
Quaternion< float, 0 > Quaternionf
This class is used to update entities based on trajectory defined by keyframes.
double v(double t, double v0, double a0, double j)
std::ostream & operator<<(std::ostream &os, const Track< ValueT > &track)
void clear()
Clear the trajectory of all tracks.
void addKeyframe(const TrackID &id, const VariantKeyframe &keyframe)
Add a keyframe to the specified track.