A track represents the timeline of a single value, identified by a track ID.
More...
#include <RobotAPI/libraries/SimpleTrajectory/Track.h>
|
| using | UpdateFunc = std::function<void(ValueT)> |
| | The update function type.
|
| |
|
| void | addKeyframe (const Keyframe< ValueT > &keyframe) |
| | Add a keyframe to this track.
|
| |
| void | addKeyframe (float time, const ValueT &value) |
| | Add a keyframe to this track.
|
| |
| ValueT | at (float time) const |
| | Get the interpolated value at the given time.
|
| |
| void | clear () |
| | Clear the track of all keyframes.
|
| |
| bool | empty () const |
| | Indicate whether this track does not contain any keyframes.
|
| |
| KeyframeProxy | operator[] (float time) |
| | Add a keyframe by assignment: track[time] = value;
|
| |
| | Track (const TrackID &id) |
| | Construct a track with given ID (and no update function).
|
| |
| | Track (const TrackID &id, UpdateFunc updateFunc) |
| | Construct a track with given ID and update function.
|
| |
| void | update (float time, bool ignoreIfEmpty=false) |
| | Call the update function with the interpolated value at the given time.
|
| |
|
| template<typename V> |
| std::ostream & | operator<< (std::ostream &os, const Track< V > &track) |
| |
template<typename ValueT>
class armarx::trajectory::Track< ValueT >
A track represents the timeline of a single value, identified by a track ID.
A track is comprised of a sequence of keyframes and used to call a single update function.
◆ UpdateFunc
template<typename ValueT>
The update function type.
◆ Track() [1/2]
template<typename ValueT>
Construct a track with given ID (and no update function).
◆ Track() [2/2]
template<typename ValueT>
Construct a track with given ID and update function.
◆ addKeyframe() [1/2]
template<typename ValueT>
| void addKeyframe |
( |
const Keyframe< ValueT > & | keyframe | ) |
|
Add a keyframe to this track.
◆ addKeyframe() [2/2]
template<typename ValueT>
| void addKeyframe |
( |
float | time, |
|
|
const ValueT & | value ) |
Add a keyframe to this track.
◆ at()
Get the interpolated value at the given time.
- Exceptions
-
| `error::EmptyTrack` | If the track is empty. |
◆ clear()
Clear the track of all keyframes.
◆ empty()
Indicate whether this track does not contain any keyframes.
◆ operator[]()
template<typename V>
| auto operator[] |
( |
float | time | ) |
|
Add a keyframe by assignment: track[time] = value;
◆ update()
template<typename V>
| void update |
( |
float | time, |
|
|
bool | ignoreIfEmpty = false ) |
Call the update function with the interpolated value at the given time.
- Parameters
-
| ignoreIfEmpty | If true and the track is empty, the method does nothing. |
- Exceptions
-
| `error::EmptyTrack` | If the track is empty and ignoreIfEmpty is false. |
◆ operator<<
template<typename ValueT>
template<typename V>
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const Track< V > & | track ) |
|
friend |
The documentation for this class was generated from the following file:
- RobotAPI/libraries/SimpleTrajectory/Track.h