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

#include <AnimTrack.h>

Inherits IUiAnimTrack.

Public Member Functions

 AZ_RTTI ((TUiAnimTrack, "{5513FA16-991D-40DD-99B2-9C5531AC872C}", KeyType), IUiAnimTrack)
 
EUiAnimCurveType GetCurveType () override
 
EUiAnimValue GetValueType () override
 
int GetSubTrackCount () const override
 
IUiAnimTrackGetSubTrack (int nIndex) const override
 
AZStd::string GetSubTrackName (int nIndex) const override
 
void SetSubTrackName (int nIndex, const char *name) override
 
const CUiAnimParamTypeGetParameterType () const override
 
void SetParameterType (CUiAnimParamType type) override
 
const UiAnimParamDataGetParamData () const override
 
void SetParamData (const UiAnimParamData &param) override
 
void add_ref () override
 
void release () override
 
bool IsKeySelected (int key) const override
 
void SelectKey (int key, bool select) 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 (IUiAnimTrack *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) override
 
void GetValue (float time, Vec3 &value) override
 
void GetValue (float time, Vec4 &value) override
 
void GetValue (float time, Quat &value) override
 
void GetValue (float time, bool &value) override
 
void GetValue (float time, AZ::Vector2 &value) override
 
void GetValue (float time, AZ::Vector3 &value) override
 
void GetValue (float time, AZ::Vector4 &value) override
 
void GetValue (float time, AZ::Color &value) override
 
void SetValue (float time, const float &value, bool bDefault=false) override
 
void SetValue (float time, const Vec3 &value, bool bDefault=false) override
 
void SetValue (float time, const Vec4 &value, bool bDefault=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 AZ::Vector2 &value, bool bDefault=false) override
 
void SetValue (float time, const AZ::Vector3 &value, bool bDefault=false) override
 
void SetValue (float time, const AZ::Vector4 &value, bool bDefault=false) override
 
void SetValue (float time, const AZ::Color &value, bool bDefault=false) override
 
void OffsetKeyPosition (const Vec3 &value) override
 
void SetTimeRange (const Range &timeRange) override
 
bool Serialize (IUiAnimationSystem *uiAnimationSystem, 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
 
- Public Member Functions inherited from IUiAnimTrack
virtual void add_ref ()=0
 
virtual void release ()=0
 
virtual EUiAnimCurveType GetCurveType ()=0
 
virtual EUiAnimValue GetValueType ()=0
 
virtual ColorB GetCustomColor () const =0
 
virtual void SetCustomColor (ColorB color)=0
 
virtual bool HasCustomColor () const =0
 
virtual void ClearCustomColor ()=0
 
virtual const CUiAnimParamTypeGetParameterType () const =0
 
virtual void SetParameterType (CUiAnimParamType type)=0
 
virtual const UiAnimParamDataGetParamData () const =0
 
virtual void SetParamData (const UiAnimParamData &param)=0
 
virtual int GetSubTrackCount () const =0
 
virtual IUiAnimTrackGetSubTrack (int nIndex) const =0
 
virtual AZStd::string GetSubTrackName (int nIndex) const =0
 
virtual void SetSubTrackName (int nIndex, const char *name)=0
 
virtual void GetKeyValueRange (float &fMin, float &fMax) const =0
 
virtual void SetKeyValueRange (float fMin, float fMax)=0
 
virtual int GetNumKeys () const =0
 Return number of keys in track.
 
virtual bool HasKeys () const =0
 Return true if keys exists in this track.
 
virtual void SetNumKeys (int numKeys)=0
 
virtual void RemoveKey (int num)=0
 Remove specified key.
 
virtual void GetKey (int index, IKey *key) const =0
 
virtual float GetKeyTime (int index) const =0
 
virtual int FindKey (float time)=0
 
virtual int GetKeyFlags (int index)=0
 
virtual void SetKey (int index, IKey *key)=0
 
virtual void SetKeyTime (int index, float time)=0
 Set time of specified key.
 
virtual void SetKeyFlags (int index, int flags)=0
 Set flags of specified key.
 
virtual void SortKeys ()=0
 Sort keys in track (after time of keys was modified).
 
virtual int GetFlags ()=0
 Get track flags.
 
virtual bool IsMasked (const uint32 mask) const =0
 Check if track is masked by mask.
 
virtual void SetFlags (int flags)=0
 Set track flags.
 
virtual int CreateKey (float time)=0
 
virtual int CloneKey (int key)=0
 
virtual int CopyKey (IUiAnimTrack *pFromTrack, int nFromKey)=0
 
virtual void GetKeyInfo (int key, const char *&description, float &duration)=0
 
virtual void GetValue (float time, float &value)=0
 
virtual void GetValue (float time, Vec3 &value)=0
 
virtual void GetValue (float time, Vec4 &value)=0
 
virtual void GetValue (float time, Quat &value)=0
 
virtual void GetValue (float time, bool &value)=0
 
virtual void GetValue (float time, AZ::Vector2 &value)=0
 
virtual void GetValue (float time, AZ::Vector3 &value)=0
 
virtual void GetValue (float time, AZ::Vector4 &value)=0
 
virtual void GetValue (float time, AZ::Color &value)=0
 
virtual void SetValue (float time, const float &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const Vec3 &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const Vec4 &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const Quat &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const bool &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const AZ::Vector2 &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const AZ::Vector3 &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const AZ::Vector4 &value, bool bDefault=false)=0
 
virtual void SetValue (float time, const AZ::Color &value, bool bDefault=false)=0
 
virtual void OffsetKeyPosition (const Vec3 &value)=0
 
virtual void SetTimeRange (const Range &timeRange)=0
 
virtual bool Serialize (IUiAnimationSystem *uiAnimationSystem, XmlNodeRef &xmlNode, bool bLoading, bool bLoadEmptyTracks=true)=0
 
virtual bool SerializeSelection (XmlNodeRef &xmlNode, bool bLoading, bool bCopySelected=false, float fTimeOffset=0)=0
 
virtual void InitPostLoad (IUiAnimSequence *)
 
virtual void Animate (SUiAnimContext &ec)
 For custom track animate parameters.
 
virtual ISplineInterpolator * GetSpline () const
 
virtual bool IsKeySelected (int key) const
 
virtual void SelectKey (int key, bool select)
 
virtual int NextKeyByTime (int key) const
 
virtual int GetAnimationLayerIndex () const
 Get the animation layer index assigned. (only for character/look-at tracks ATM)
 
virtual void SetAnimationLayerIndex (int index)
 Set the animation layer index. (only for character/look-at tracks ATM)
 

Static Public Member Functions

static void Reflect (AZ::SerializeContext *serializeContext)
 

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
 
CUiAnimParamType m_nParamType
 
unsigned int m_currKey: 31
 
unsigned int m_bModified: 1
 
float m_lastTime
 
int m_flags
 
UiAnimParamData m_componentParamData
 
float m_fMinKeyValue
 
float m_fMaxKeyValue
 

Static Protected Attributes

static constexpr unsigned int InvalidKey = 0x7FFFFFFF
 

Additional Inherited Members

- Public Types inherited from IUiAnimTrack
enum  EUiAnimTrackFlags {
  eUiAnimTrackFlags_Linear = BIT(1) , eUiAnimTrackFlags_Loop = BIT(2) , eUiAnimTrackFlags_Cycle = BIT(3) , eUiAnimTrackFlags_Disabled = BIT(4) ,
  eUiAnimTrackFlags_Hidden = BIT(5) , eUiAnimTrackFlags_Muted = BIT(8)
}
 Flags that can be set on animation track. More...
 

Detailed Description

template<class KeyType>
class TUiAnimTrack< KeyType >

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

Member Function Documentation

◆ add_ref()

template<class KeyType >
void TUiAnimTrack< KeyType >::add_ref
inlineoverridevirtual

Implements IUiAnimTrack.

◆ CloneKey()

template<class KeyType >
int TUiAnimTrack< KeyType >::CloneKey ( int  key)
inlineoverridevirtual

Clone key at specified index. @retun Index of new key.

Implements IUiAnimTrack.

◆ CopyKey()

template<class KeyType >
int TUiAnimTrack< KeyType >::CopyKey ( IUiAnimTrack pFromTrack,
int  nFromKey 
)
inlineoverridevirtual

Clone key at specified index from another track of SAME TYPE. @retun Index of new key.

Implements IUiAnimTrack.

◆ CreateKey()

template<class KeyType >
int TUiAnimTrack< KeyType >::CreateKey ( float  time)
inlineoverridevirtual

Create key at given time, and return its index.

Returns
Index of new key.

Implements IUiAnimTrack.

◆ FindKey()

template<class KeyType >
int TUiAnimTrack< KeyType >::FindKey ( float  time)
inlineoverridevirtual

Find key at given time.

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

Implements IUiAnimTrack.

◆ GetActiveKey()

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

Get last key before specified time.

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

◆ GetCurveType()

template<class KeyType >
EUiAnimCurveType TUiAnimTrack< KeyType >::GetCurveType ( )
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetFlags()

template<class KeyType >
int TUiAnimTrack< KeyType >::GetFlags ( )
inlineoverridevirtual

Get track flags.

Implements IUiAnimTrack.

◆ GetKey()

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

Get key at specified location.

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

Implements IUiAnimTrack.

◆ GetKeyFlags()

template<class KeyType >
int TUiAnimTrack< KeyType >::GetKeyFlags ( int  index)
inlineoverridevirtual

Get flags of specified key.

Returns
key time.

Implements IUiAnimTrack.

◆ GetKeyTime()

template<class KeyType >
float TUiAnimTrack< KeyType >::GetKeyTime ( int  index) const
inlineoverridevirtual

Get time of specified key.

Returns
key time.

Implements IUiAnimTrack.

◆ GetKeyValueRange()

template<class KeyType >
void TUiAnimTrack< KeyType >::GetKeyValueRange ( float &  fMin,
float &  fMax 
) const
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetNumKeys()

template<class KeyType >
int TUiAnimTrack< KeyType >::GetNumKeys ( ) const
inlineoverridevirtual

Return number of keys in track.

Implements IUiAnimTrack.

◆ GetParamData()

template<class KeyType >
const UiAnimParamData & TUiAnimTrack< KeyType >::GetParamData ( ) const
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetParameterType()

template<class KeyType >
const CUiAnimParamType & TUiAnimTrack< KeyType >::GetParameterType ( ) const
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetSubTrack()

template<class KeyType >
IUiAnimTrack * TUiAnimTrack< KeyType >::GetSubTrack ( int  nIndex) const
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetSubTrackCount()

template<class KeyType >
int TUiAnimTrack< KeyType >::GetSubTrackCount ( ) const
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetSubTrackName()

template<class KeyType >
AZStd::string TUiAnimTrack< KeyType >::GetSubTrackName ( int  nIndex) const
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [1/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
AZ::Color &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [2/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
AZ::Vector2 &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [3/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
AZ::Vector3 &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [4/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
AZ::Vector4 &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [5/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
bool &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [6/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
float &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [7/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
Quat &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [8/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
Vec3 &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValue() [9/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::GetValue ( float  time,
Vec4 &  value 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ GetValueType()

template<class KeyType >
EUiAnimValue TUiAnimTrack< KeyType >::GetValueType ( )
inlineoverridevirtual

Implements IUiAnimTrack.

◆ HasKeys()

template<class KeyType >
bool TUiAnimTrack< KeyType >::HasKeys ( ) const
inlineoverridevirtual

Return true if keys exists in this track.

Implements IUiAnimTrack.

◆ IsKeySelected()

template<class KeyType >
bool TUiAnimTrack< KeyType >::IsKeySelected ( int  key) const
inlineoverridevirtual

Reimplemented from IUiAnimTrack.

◆ IsMasked()

template<class KeyType >
bool TUiAnimTrack< KeyType >::IsMasked ( const uint32  mask) const
inlineoverridevirtual

Check if track is masked.

Implements IUiAnimTrack.

◆ OffsetKeyPosition()

template<class KeyType >
void TUiAnimTrack< KeyType >::OffsetKeyPosition ( const Vec3 &  value)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ release()

template<class KeyType >
void TUiAnimTrack< KeyType >::release
inlineoverridevirtual

Implements IUiAnimTrack.

◆ RemoveKey()

template<class KeyType >
void TUiAnimTrack< KeyType >::RemoveKey ( int  num)
inlineoverridevirtual

Remove specified key.

Implements IUiAnimTrack.

◆ SelectKey()

template<class KeyType >
void TUiAnimTrack< KeyType >::SelectKey ( int  key,
bool  select 
)
inlineoverridevirtual

Reimplemented from IUiAnimTrack.

◆ Serialize()

template<class KeyType >
bool TUiAnimTrack< KeyType >::Serialize ( IUiAnimationSystem uiAnimationSystem,
XmlNodeRef &  xmlNode,
bool  bLoading,
bool  bLoadEmptyTracks = true 
)
inlineoverridevirtual

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

Implements IUiAnimTrack.

◆ SerializeKey()

template<class KeyType >
virtual void TUiAnimTrack< 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 UiBoolTrack, and CUiTrackEventTrack.

◆ SerializeSelection()

template<class KeyType >
bool TUiAnimTrack< KeyType >::SerializeSelection ( XmlNodeRef &  xmlNode,
bool  bLoading,
bool  bCopySelected = false,
float  fTimeOffset = 0 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetFlags()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetFlags ( int  flags)
inlineoverridevirtual

Set track flags.

Implements IUiAnimTrack.

◆ SetKey()

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

Set key at specified location.

Parameters
keyMust be valid pointer to compatible key structure.

Implements IUiAnimTrack.

◆ SetKeyFlags()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetKeyFlags ( int  index,
int  flags 
)
inlineoverridevirtual

Set flags of specified key.

Implements IUiAnimTrack.

◆ SetKeyTime()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetKeyTime ( int  index,
float  time 
)
inlineoverridevirtual

Set time of specified key.

Implements IUiAnimTrack.

◆ SetKeyValueRange()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetKeyValueRange ( float  fMin,
float  fMax 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetNumKeys()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetNumKeys ( int  numKeys)
inlineoverridevirtual

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

Implements IUiAnimTrack.

◆ SetParamData()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetParamData ( const UiAnimParamData param)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetParameterType()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetParameterType ( CUiAnimParamType  type)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetSubTrackName()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetSubTrackName ( int  nIndex,
const char *  name 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetTimeRange()

template<class KeyType >
void TUiAnimTrack< KeyType >::SetTimeRange ( const Range &  timeRange)
inlineoverridevirtual

Assign active time range for this track.

Implements IUiAnimTrack.

◆ SetValue() [1/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const AZ::Color &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [2/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const AZ::Vector2 &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [3/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const AZ::Vector3 &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [4/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const AZ::Vector4 &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [5/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const bool &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [6/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const float &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [7/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const Quat &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [8/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const Vec3 &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SetValue() [9/9]

template<class KeyType >
void TUiAnimTrack< KeyType >::SetValue ( float  time,
const Vec4 &  value,
bool  bDefault = false 
)
inlineoverridevirtual

Implements IUiAnimTrack.

◆ SortKeys()

template<class KeyType >
void TUiAnimTrack< KeyType >::SortKeys
inlineoverridevirtual

Sort keys in track (after time of keys was modified).

Implements IUiAnimTrack.


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