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::AnimGraphSyncTrack Class Reference

Inherits EMotionFX::MotionEventTrack.

Public Member Functions

 AZ_RTTI (AnimGraphSyncTrack, "{5C49D549-4A2D-42A9-BB16-564BEA63C4B1}", MotionEventTrack)
 
 AnimGraphSyncTrack (Motion *motion)
 
 AnimGraphSyncTrack (const char *name, Motion *motion)
 
 AnimGraphSyncTrack (const AnimGraphSyncTrack &other)
 
AnimGraphSyncTrackoperator= (const AnimGraphSyncTrack &other)
 
bool FindEventIndices (float timeInSeconds, size_t *outIndexA, size_t *outIndexB) const
 : Finds the event to the left and right of timeInSeconds
 
bool FindMatchingEvents (size_t syncIndex, size_t firstEventID, size_t secondEventID, size_t *outIndexA, size_t *outIndexB, bool forward, bool mirror) const
 : Finds the indices of the next event pair
 
float CalcSegmentLength (size_t indexA, size_t indexB) const
 
bool ExtractOccurrence (size_t occurrence, size_t firstEventID, size_t secondEventID, size_t *outIndexA, size_t *outIndexB, bool mirror) const
 
size_t CalcOccurrence (size_t indexA, size_t indexB, bool mirror) const
 
float GetDuration () const
 
- Public Member Functions inherited from EMotionFX::MotionEventTrack
 MotionEventTrack (Motion *motion)
 
 MotionEventTrack (const char *name, Motion *motion)
 
 MotionEventTrack (const MotionEventTrack &other)
 
MotionEventTrackoperator= (const MotionEventTrack &other)
 
void SetName (const char *name)
 
size_t AddEvent (float timeValue, EventDataPtr &&data)
 
size_t AddEvent (float timeValue, EventDataSet &&datas)
 
size_t AddEvent (float startTimeValue, float endTimeValue, EventDataPtr &&data)
 
size_t AddEvent (float startTimeValue, float endTimeValue, EventDataSet &&data)
 
void ProcessEvents (float startTime, float endTime, const MotionInstance *motionInstance) const
 
void ExtractEvents (float startTime, float endTime, const MotionInstance *motionInstance, AnimGraphEventBuffer *outEventBuffer) const
 
size_t GetNumEvents () const
 
const MotionEventGetEvent (size_t eventNr) const
 
MotionEventGetEvent (size_t eventNr)
 
void RemoveEvent (size_t eventNr)
 
void RemoveAllEvents ()
 
void Clear ()
 
const char * GetName () const
 
const AZStd::string & GetNameString () const
 
void SetIsEnabled (bool enabled)
 
bool GetIsEnabled () const
 
bool GetIsDeletable () const
 
void SetIsDeletable (bool isDeletable)
 
MotionGetMotion () const
 
void SetMotion (Motion *newMotion)
 
void CopyTo (MotionEventTrack *targetTrack) const
 
void ReserveNumEvents (size_t numEvents)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from EMotionFX::MotionEventTrack
static void Reflect (AZ::ReflectContext *context)
 
static MotionEventTrackCreate (Motion *motion)
 
static MotionEventTrackCreate (const char *name, Motion *motion)
 

Additional Inherited Members

- Protected Attributes inherited from EMotionFX::MotionEventTrack
AZStd::vector< MotionEventm_events
 
AZStd::string m_name
 
Motionm_motion
 The motion where this track belongs to.
 
bool m_enabled = true
 Is this track enabled?
 
bool m_deletable = true
 

Member Function Documentation

◆ FindEventIndices()

bool EMotionFX::AnimGraphSyncTrack::FindEventIndices ( float  timeInSeconds,
size_t *  outIndexA,
size_t *  outIndexB 
) const

: Finds the event to the left and right of timeInSeconds

Parameters
[in]timeInSeconds
[out]outIndexAThe event whose start time is closest to, but less than, timeInSeconds
[out]outIndexBThe event whose start time is closest to, but greater than, timeInSeconds
Returns
: bool true iff an event pair was found

◆ FindMatchingEvents()

bool EMotionFX::AnimGraphSyncTrack::FindMatchingEvents ( size_t  syncIndex,
size_t  firstEventID,
size_t  secondEventID,
size_t *  outIndexA,
size_t *  outIndexB,
bool  forward,
bool  mirror 
) const

: Finds the indices of the next event pair

Parameters
[in]syncIndexStart the search from this event index
[in]firstEventIDThe hash of the first event in the pair to search for
[in]secondEventIDThe hash of the second event in the pair to search for
[out]outIndexAThe index of the found event matching firstEventID
[out]outIndexBThe index of the found event matching secondEventID
[in]forwardDirection of the search. True for forward playback, false otherwise
[in]mirrorTrue if the the motion using this event track is mirrored
Returns
: bool true iff a valid matching pair of events was found.

Search for matching event pairs. firstEventID and secondEventID represent the hash of a sequential event pair in a different event track. This method attempts to find a pair of sequential events that have the same hash value.


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