Open 3D Engine LyShine 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.
IUiAnimTrack Struct Referenceabstract

#include <IUiAnimation.h>

Inherited by TUiAnimSplineTrack< Vec2 >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, TUiAnimTrack< KeyType >, and UiCompoundSplineTrack.

Public Types

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...
 

Public Member Functions

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 AZ::Vector3 &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 ([[maybe_unused]] SUiAnimContext &ec)
 For custom track animate parameters.
 
virtual ISplineInterpolator * GetSpline () const
 
virtual bool IsKeySelected ([[maybe_unused]] int key) const
 
virtual void SelectKey ([[maybe_unused]] int key, [[maybe_unused]] 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 ([[maybe_unused]] int index)
 Set the animation layer index. (only for character/look-at tracks ATM)
 

Detailed Description

Interface of Animation Track.

Member Enumeration Documentation

◆ EUiAnimTrackFlags

Flags that can be set on animation track.

Enumerator
eUiAnimTrackFlags_Linear 

Use only linear interpolation between keys.

eUiAnimTrackFlags_Loop 

Play this track in a loop.

eUiAnimTrackFlags_Cycle 

Cycle track.

eUiAnimTrackFlags_Disabled 

Disable this track.

eUiAnimTrackFlags_Hidden 

Set when track is hidden in UI Animation editor.

eUiAnimTrackFlags_Muted 

Mute this sound track. This only affects the playback in editor.

Member Function Documentation

◆ CloneKey()

virtual int IUiAnimTrack::CloneKey ( int  key)
pure virtual

◆ CopyKey()

virtual int IUiAnimTrack::CopyKey ( IUiAnimTrack pFromTrack,
int  nFromKey 
)
pure virtual

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

Implemented in TUiAnimTrack< KeyType >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, and TUiAnimSplineTrack< Vec2 >.

◆ CreateKey()

virtual int IUiAnimTrack::CreateKey ( float  time)
pure virtual

Create key at given time, and return its index.

Returns
Index of new key.

Implemented in TUiAnimTrack< KeyType >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, and TUiAnimSplineTrack< Vec2 >.

◆ FindKey()

virtual int IUiAnimTrack::FindKey ( float  time)
pure virtual

Find key at given time.

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

Implemented in TUiAnimTrack< KeyType >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, and TUiAnimSplineTrack< Vec2 >.

◆ GetKey()

virtual void IUiAnimTrack::GetKey ( int  index,
IKey *  key 
) const
pure virtual

Get key at specified location.

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

Implemented in TUiAnimTrack< KeyType >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, and TUiAnimSplineTrack< Vec2 >.

◆ GetKeyFlags()

virtual int IUiAnimTrack::GetKeyFlags ( int  index)
pure virtual

◆ GetKeyInfo()

virtual void IUiAnimTrack::GetKeyInfo ( int  key,
const char *&  description,
float &  duration 
)
pure virtual

Get info about specified key.

Parameters
Shorthuman readable text description of this key.
durationof this key in seconds.

Implemented in CUiTrackEventTrack, UiCompoundSplineTrack, TUiAnimSplineTrack< ValueType >, TUiAnimSplineTrack< Vec2 >, and UiBoolTrack.

◆ GetKeyTime()

virtual float IUiAnimTrack::GetKeyTime ( int  index) const
pure virtual

◆ NextKeyByTime()

virtual int IUiAnimTrack::NextKeyByTime ( int  key) const
inlinevirtual

Return the index of the key which lies right after the given key in time.

Parameters
keyIndex of of key.
Returns
Index of the next key in time. If the last key given, this returns -1.

Reimplemented in UiCompoundSplineTrack.

◆ SetKey()

virtual void IUiAnimTrack::SetKey ( int  index,
IKey *  key 
)
pure virtual

Set key at specified location.

Parameters
keyMust be valid pointer to compatible key structure.

Implemented in CUiTrackEventTrack, TUiAnimTrack< KeyType >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, and TUiAnimSplineTrack< Vec2 >.

◆ SetNumKeys()

virtual void IUiAnimTrack::SetNumKeys ( int  numKeys)
pure virtual

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

Implemented in TUiAnimTrack< KeyType >, TUiAnimTrack< IEventKey >, TUiAnimTrack< IBoolKey >, TUiAnimSplineTrack< ValueType >, and TUiAnimSplineTrack< Vec2 >.


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