Open 3D Engine EMotionFX Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
A description of Event parameters to be used to synchronize blended motions. More...
#include <EventDataSyncable.h>
Inherits EMotionFX::EventData.
Inherited by EMotionFX::TwoStringEventData.
Public Member Functions | |
AZ_RTTI (EventDataSyncable, "{18A0050C-D05A-424C-B645-8E3B31120CBA}", EventData) | |
virtual size_t | HashForSyncing (bool isMirror) const |
Public Member Functions inherited from EMotionFX::EventData | |
AZ_RTTI (EventData, "{F6AFCD3B-D58E-4821-9E7C-D1F437304E5D}") | |
virtual bool | operator== (const EventData &rhs) const |
virtual bool | Equal (const EventData &rhs, bool ignoreEmptyFields=false) const =0 |
Test if two EventData instances are equal. More... | |
virtual AZStd::string | ToString () const |
Static Public Member Functions | |
static void | Reflect (AZ::ReflectContext *context) |
Static Public Member Functions inherited from EMotionFX::EventData | |
static void | Reflect (AZ::ReflectContext *context) |
Protected Member Functions | |
EventDataSyncable (const size_t hash) | |
Protected Attributes | |
size_t | m_hash |
A description of Event parameters to be used to synchronize blended motions.
This class extends the functionality of the base EventData class to enable events that drive motion synchronization behavior. The synchronization code compares the result of HashForSyncing between two different Motion's Sync tracks, finding events that are equal based on their hash value.
EMotionFX supports mirroring motions programatically, and when a motion is being mirrored, the sync events also needs to be mirrored. For this purpose, the HashForSyncing method accepts an isMirror
parameter.
For example, if an EventDataSyncable subclass is made to support a horse walk, it could be done using an integer field for the foot number: 0=>left rear, 1=>right rear, 2=>left front, 3=>right front. In this case, HashForSyncing could be implemented like this:
The default implementation for HashForSyncing returns the hash of the typeid of the type, and ignores the isMirror parameter.