Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::MotionEventTable Class Reference

#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
 
MotionEventTrackFindTrackByName (const char *trackName) const
 
size_t GetNumTracks () const
 
MotionEventTrackGetTrack (size_t index) const
 
AnimGraphSyncTrackGetSyncTrack () const
 
void AutoCreateSyncTrack (Motion *motion)
 
void CopyTo (MotionEventTable *targetTable, Motion *targetTableMotion)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Friends

class MotionEvent
 

Detailed Description

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.

Member Function Documentation

◆ ExtractEvents()

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.

Parameters
startTimeThe start time of the range, in seconds.
endTimeThe end time of the range, in seconds.
motionInstanceThe motion instance which triggers the event.
outEventBufferThe output event buffer.
Note
The end time is also allowed to be smaller than the start time.

◆ ProcessEvents()

void EMotionFX::MotionEventTable::ProcessEvents ( float  startTime,
float  endTime,
const MotionInstance motionInstance 
) const

Process all events within a given time range.

Parameters
startTimeThe start time of the range, in seconds.
endTimeThe end time of the range, in seconds.
motionInstanceThe motion instance which triggers the event.
Note
The end time is also allowed to be smaller than the start time.

◆ ReserveNumTracks()

void EMotionFX::MotionEventTable::ReserveNumTracks ( size_t  numTracks)

Remove all motion event tracks.


The documentation for this class was generated from the following file: