#include <MotionEventTable.h>
Public Member Functions | |
void | InitAfterLoading (Motion *motion) |
void | ProcessEvents (float startTime, float endTime, const MotionInstance *motionInstance) const |
void | ExtractEvents (float startTime, float endTime, const MotionInstance *motionInstance, AnimGraphEventBuffer *outEventBuffer) const |
void | ReserveNumTracks (size_t numTracks) |
void | RemoveAllTracks (bool delFromMem=true) |
void | RemoveTrack (size_t index, bool delFromMem=true) |
void | AddTrack (MotionEventTrack *track) |
void | InsertTrack (size_t index, MotionEventTrack *track) |
AZ::Outcome< size_t > | FindTrackIndexByName (const char *trackName) const |
MotionEventTrack * | FindTrackByName (const char *trackName) const |
size_t | GetNumTracks () const |
MotionEventTrack * | GetTrack (size_t index) const |
AnimGraphSyncTrack * | GetSyncTrack () const |
void | AutoCreateSyncTrack (Motion *motion) |
void | CopyTo (MotionEventTable *targetTable, Motion *targetTableMotion) |
Static Public Member Functions | |
static void | Reflect (AZ::ReflectContext *context) |
Friends | |
class | MotionEvent |
The motion event table, which stores all events and their data on a memory efficient way. Events have three generic properties: a time value, an event type string and a parameter string. Unique strings are only stored once in memory, so if you have for example ten events of the type "SOUND" only 1 string will be stored in memory, and the events will index into the table to retrieve the string. The event table can also figure out what events to process within a given time range. The handling of those events is done by the MotionEventHandler class that you specify to the MotionEventManager singleton.
void EMotionFX::MotionEventTable::ExtractEvents | ( | float | startTime, |
float | endTime, | ||
const MotionInstance * | motionInstance, | ||
AnimGraphEventBuffer * | outEventBuffer | ||
) | const |
Extract all events within a given time range, and output them to an event buffer.
startTime | The start time of the range, in seconds. |
endTime | The end time of the range, in seconds. |
motionInstance | The motion instance which triggers the event. |
outEventBuffer | The output event buffer. |
void EMotionFX::MotionEventTable::ProcessEvents | ( | float | startTime, |
float | endTime, | ||
const MotionInstance * | motionInstance | ||
) | const |
Process all events within a given time range.
startTime | The start time of the range, in seconds. |
endTime | The end time of the range, in seconds. |
motionInstance | The motion instance which triggers the event. |
void EMotionFX::MotionEventTable::ReserveNumTracks | ( | size_t | numTracks | ) |
Remove all motion event tracks.