![]() |
Plasma Engine
2.0
|
An event track is a time line that contains named events. More...
#include <EventTrack.h>
Public Member Functions | |
void | Clear () |
Removes all control points. | |
bool | IsEmpty () const |
Checks whether there are any control points in the track. | |
void | AddControlPoint (plTime time, plStringView sEvent) |
Adds a named event into the track at the given time. | |
void | Sample (plTime rangeStart, plTime rangeEnd, plDynamicArray< plHashedString > &out_events) const |
Samples the event track from range [start; end) and adds all events that occured in that time period to the array. | |
void | Save (plStreamWriter &inout_stream) const |
void | Load (plStreamReader &inout_stream) |
An event track is a time line that contains named events.
The time line can be sampled to query all events that occurred during a time period. There is no way to sample an event track at a fixed point in time, because events occur at specific time points and thus only range queries make sense.
void plEventTrack::Sample | ( | plTime | rangeStart, |
plTime | rangeEnd, | ||
plDynamicArray< plHashedString > & | out_events ) const |
Samples the event track from range [start; end) and adds all events that occured in that time period to the array.
Note that the range is inclusive for the start time, and exclusive for the end time.
If rangeStart is larger than rangeEnd, the events are returned in reverse order (backwards traversal).