Open 3D Engine Maestro 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.
TAnimTrack< KeyType > Class Template Referenceabstract

#include <AnimTrack.h>

Inherits IAnimTrack.

Public Member Functions

 AZ_CLASS_ALLOCATOR (TAnimTrack, AZ::SystemAllocator)
 
 AZ_RTTI ((TAnimTrack, "{D6E0F0E3-8843-46F0-8484-7B6E130409AE}", KeyType), IAnimTrack)
 
EAnimCurveType GetCurveType () override
 
AnimValueType GetValueType () override
 
void SetNode (IAnimNode *node) override
 
IAnimNode * GetNode () override
 
int GetSubTrackCount () const override
 
IAnimTrack * GetSubTrack (int nIndex) const override
 
AZStd::string GetSubTrackName (int nIndex) const override
 
void SetSubTrackName (int nIndex, const char *name) override
 
const CAnimParamType & GetParameterType () const override
 
void SetParameterType (CAnimParamType type) override
 
void add_ref () override
 
void release () override
 
bool IsKeySelected (int key) const override
 
void SelectKey (int key, bool select) override
 
bool IsSortMarkerKey (unsigned int key) const override
 
void SetSortMarkerKey (unsigned int key, bool enabled) override
 
int GetNumKeys () const override
 Return number of keys in track.
 
bool HasKeys () const override
 Return true if keys exists in this track.
 
void SetNumKeys (int numKeys) override
 
void RemoveKey (int num) override
 Remove specified key.
 
int CreateKey (float time) override
 
int CloneKey (int fromKey) override
 
int CopyKey (IAnimTrack *pFromTrack, int nFromKey) override
 
void GetKey (int index, IKey *key) const override
 
float GetKeyTime (int index) const override
 
int FindKey (float time) override
 
int GetKeyFlags (int index) override
 
void SetKey (int index, IKey *key) override
 
void SetKeyTime (int index, float time) override
 Set time of specified key.
 
void SetKeyFlags (int index, int flags) override
 Set flags of specified key.
 
void SortKeys () override
 Sort keys in track (after time of keys was modified).
 
int GetFlags () override
 Get track flags.
 
bool IsMasked (const uint32 mask) const override
 Check if track is masked.
 
void SetFlags (int flags) override
 Set track flags.
 
void GetValue (float time, float &value, bool applyMultiplier=false) override
 
void GetValue (float time, Vec3 &value, bool applyMultiplier=false) override
 
void GetValue (float time, Vec4 &value, bool applyMultiplier=false) override
 
void GetValue (float time, Quat &value) override
 
void GetValue (float time, bool &value) override
 
void GetValue (float time, Maestro::AssetBlends< AZ::Data::AssetData > &value) override
 
void SetValue (float time, const float &value, bool bDefault=false, bool applyMultiplier=false) override
 
void SetValue (float time, const Vec3 &value, bool bDefault=false, bool applyMultiplier=false) override
 
void SetValue (float time, const Vec4 &value, bool bDefault=false, bool applyMultiplier=false) override
 
void SetValue (float time, const Quat &value, bool bDefault=false) override
 
void SetValue (float time, const bool &value, bool bDefault=false) override
 
void SetValue (float time, const Maestro::AssetBlends< AZ::Data::AssetData > &value, bool bDefault=false) override
 
void OffsetKeyPosition (const Vec3 &value) override
 
void UpdateKeyDataAfterParentChanged (const AZ::Transform &oldParentWorldTM, const AZ::Transform &newParentWorldTM) override
 
void SetTimeRange (const Range &timeRange) override
 
bool Serialize (XmlNodeRef &xmlNode, bool bLoading, bool bLoadEmptyTracks=true) override
 
bool SerializeSelection (XmlNodeRef &xmlNode, bool bLoading, bool bCopySelected=false, float fTimeOffset=0) override
 
virtual void SerializeKey (KeyType &key, XmlNodeRef &keyNode, bool bLoading)=0
 
int GetActiveKey (float time, KeyType *key)
 
void GetKeyValueRange (float &fMin, float &fMax) const override
 
void SetKeyValueRange (float fMin, float fMax) override
 
void SetMultiplier (float trackMultiplier) override
 
void SetExpanded (bool expanded) override
 
bool GetExpanded () const override
 
unsigned int GetId () const override
 
void SetId (unsigned int id) override
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Protected Types

typedef AZStd::vector< KeyType > Keys
 

Protected Member Functions

void CheckValid ()
 
void Invalidate ()
 

Protected Attributes

int m_refCount
 
Keys m_keys
 
Range m_timeRange
 
CAnimParamType m_nParamType
 
int m_currKey: 31
 
int m_bModified: 1
 
float m_lastTime
 
int m_flags
 
float m_fMinKeyValue
 
float m_fMaxKeyValue
 
IAnimNode * m_node
 
float m_trackMultiplier
 
unsigned int m_id = 0
 

Detailed Description

template<class KeyType>
class TAnimTrack< KeyType >

General templated track for event type keys. KeyType class must be derived from IKey.

Member Function Documentation

◆ FindKey()

template<class KeyType >
int TAnimTrack< KeyType >::FindKey ( float  time)
inlineoverride

Find key at given time.

Returns
Index of found key, or -1 if key with this time not found.

◆ GetActiveKey()

template<class KeyType >
int TAnimTrack< KeyType >::GetActiveKey ( float  time,
KeyType *  key 
)
inline

Get last key before specified time.

Returns
Index of key, or -1 if such key not exist.

◆ GetKey()

template<class KeyType >
void TAnimTrack< KeyType >::GetKey ( int  index,
IKey *  key 
) const
inlineoverride

Get key at specified location.

Parameters
keyMust be valid pointer to compatible key structure, to be filled with specified key location.

◆ GetKeyFlags()

template<class KeyType >
int TAnimTrack< KeyType >::GetKeyFlags ( int  index)
inlineoverride

Get flags of specified key.

Returns
key time.

◆ GetKeyTime()

template<class KeyType >
float TAnimTrack< KeyType >::GetKeyTime ( int  index) const
inlineoverride

Get time of specified key.

Returns
key time.

◆ Serialize()

template<class KeyType >
bool TAnimTrack< KeyType >::Serialize ( XmlNodeRef &  xmlNode,
bool  bLoading,
bool  bLoadEmptyTracks = true 
)
inlineoverride

Serialize this animation track to XML. Do not override this method, prefer to override SerializeKey.

Deprecated:
Serialization for Sequence data in Component Entity Sequences now occurs through AZ::SerializeContext and the Sequence Component

◆ SerializeKey()

template<class KeyType >
virtual void TAnimTrack< KeyType >::SerializeKey ( KeyType &  key,
XmlNodeRef &  keyNode,
bool  bLoading 
)
pure virtual

Serialize single key of this track. Override this in derived classes. Do not save time attribute, it is already saved in Serialize of the track.

Implemented in CAssetBlendTrack, CBoolTrack, CCaptureTrack, CCharacterTrack, CCommentTrack, CConsoleTrack, CGotoTrack, CEventTrack, CTrackEventTrack, CLookAtTrack, CScreenFaderTrack, CSelectTrack, CSequenceTrack, CSoundTrack, and CTimeRangesTrack.

◆ SetKey()

template<class KeyType >
void TAnimTrack< KeyType >::SetKey ( int  index,
IKey *  key 
)
inlineoverride

Set key at specified location.

Parameters
keyMust be valid pointer to compatible key structure.

◆ SetNumKeys()

template<class KeyType >
void TAnimTrack< KeyType >::SetNumKeys ( int  numKeys)
inlineoverride

Set number of keys in track. If needed adds empty keys at end or remove keys from end.

◆ SetTimeRange()

template<class KeyType >
void TAnimTrack< KeyType >::SetTimeRange ( const Range &  timeRange)
inlineoverride

Assign active time range for this track.


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