![]() |
ezEngine
Release 25.03
|
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 (ezTime time, ezStringView sEvent) |
Adds a named event into the track at the given time. | |
void | Sample (ezTime rangeStart, ezTime rangeEnd, ezDynamicArray< ezHashedString > &out_events) const |
Samples the event track from range [start; end) and adds all events that occured in that time period to the array. More... | |
void | Save (ezStreamWriter &inout_stream) const |
void | Load (ezStreamReader &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 ezEventTrack::Sample | ( | ezTime | rangeStart, |
ezTime | rangeEnd, | ||
ezDynamicArray< ezHashedString > & | 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).