Open 3D Engine Maestro Gem API Reference 25.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Maestro::CCompoundSplineTrack Class Reference

Inherits IAnimTrack.

Public Member Functions

 AZ_CLASS_ALLOCATOR (CCompoundSplineTrack, AZ::SystemAllocator)
 
 AZ_RTTI (CCompoundSplineTrack, "{E6B88EF4-6DB7-48E7-9758-DF6C9E40D4D2}", IAnimTrack)
 
 CCompoundSplineTrack (int nDims, AnimValueType inValueType, CAnimParamType subTrackParamTypes[MaxSubtracks], bool expanded)
 
void add_ref () override
 
void release () override
 
void SetNode (IAnimNode *node) override
 
IAnimNode * GetNode () const 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
 
EAnimCurveType GetCurveType () const override
 
AnimValueType GetValueType () const override
 
const CAnimParamType & GetParameterType () const override
 
void SetParameterType (CAnimParamType type) override
 
int GetNumKeys () const override
 Return number of all keys in all sub-tracks.
 
void SetNumKeys (int numKeys) override
 
bool HasKeys () const override
 Return true if a key exists in sub-tracks.
 
void RemoveKey (int keyIndex) override
 Remove single key from a sub-track by index. Index is extended, belongs to (0 .. total number of keys in sub-tracks).
 
void GetKeyInfo (int keyIndex, const char *&description, float &duration) const override
 
int CreateKey (float time) override
 
int CloneKey (int srcKeyIndex, float timeOffset) override
 
int CopyKey (IAnimTrack *pFromTrack, int fromKeyIndex) override
 
void GetKey (int keyIndex, IKey *key) const override
 
float GetKeyTime (int keyIndex) const override
 
float GetMinKeyTimeDelta () const override
 
int FindKey (float time) const override
 
int GetKeyFlags (int keyIndex) override
 
void SetKey (int keyIndex, IKey *key) override
 
void SetKeyTime (int keyIndex, float time) override
 
void SetKeyFlags (int keyIndex, int flags) override
 
void SortKeys () override
 
bool IsKeySelected (int keyIndex) const override
 
void SelectKey (int keyIndex, bool select) override
 
int GetFlags () const override
 
bool IsMasked (const uint32 mask) const override
 
void SetFlags (int flags) override
 
void GetValue (float time, float &value, bool applyMultiplier=false) const override
 
void GetValue (float time, AZ::Vector3 &value, bool applyMultiplier=false) const override
 
void GetValue (float time, AZ::Vector4 &value, bool applyMultiplier=false) const override
 
void GetValue (float time, AZ::Quaternion &value) const override
 
void GetValue (float time, bool &value) const override
 
void GetValue (float time, AssetBlends< AZ::Data::AssetData > &value) const override
 
void GetValue (float time, AZStd::string &value) const override
 
void SetValue (float time, const float &value, bool bDefault=false, bool applyMultiplier=false) override
 
void SetValue (float time, const AZ::Vector3 &value, bool bDefault=false, bool applyMultiplier=false) override
 
void SetValue (float time, const AZ::Vector4 &value, bool bDefault=false, bool applyMultiplier=false) override
 
void SetValue (float time, const AZ::Quaternion &value, bool bDefault=false) override
 
void SetValue (float time, const bool &value, bool bDefault=false) override
 
void SetValue (float time, const AssetBlends< AZ::Data::AssetData > &value, bool bDefault=false) override
 
void SetValue (float time, const AZStd::string &value, bool bDefault=false) override
 
void OffsetKeyPosition (const AZ::Vector3 &value) override
 
void UpdateKeyDataAfterParentChanged (const AZ::Transform &oldParentWorldTM, const AZ::Transform &newParentWorldTM) override
 
void SetTimeRange (const Range &timeRange) override
 
Range GetTimeRange () const override
 
bool Serialize (XmlNodeRef &xmlNode, bool bLoading, bool bLoadEmptyTracks=true) override
 
bool SerializeSelection (XmlNodeRef &xmlNode, bool bLoading, bool bCopySelected=false, float fTimeOffset=0) override
 
void InitPostLoad (IAnimSequence *sequence) override
 
int NextKeyByTime (int keyIndex) const override
 
void SetSubTrackName (const int idx, const AZStd::string &name)
 
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)
 

Static Public Attributes

static constexpr int MaxSubtracks = 4
 

Protected Member Functions

void RenameSubTracksIfNeeded ()
 
void SetKeyValueRanges ()
 
float PreferShortestRotPath (float degree, float degree0) const
 
int GetSubTrackIndex (int &keyIndex) const
 

Protected Attributes

int m_refCount
 
AnimValueType m_valueType
 
int m_nDimensions
 
AZStd::vector< AZStd::intrusive_ptr< IAnimTrack > > m_subTracks
 
int m_flags
 
CAnimParamType m_nParamType
 
AZStd::vector< AZStd::string > m_subTrackNames
 
IAnimNode * m_node
 
bool m_expanded
 
unsigned int m_id = 0
 

Static Protected Attributes

static constexpr float s_MinTimePrecision = 0.01f
 

Member Function Documentation

◆ CreateKey()

int Maestro::CCompoundSplineTrack::CreateKey ( float  time)
override

Create keys at given time, and return summary index.

Returns
First index of new keys created in sub-tracks, or -1 if keys are not created (for example, if a key at this time exists).

◆ FindKey()

int Maestro::CCompoundSplineTrack::FindKey ( float  time) const
override

Find a key at given time within minimal time delta between keys, in a first track with such key.

Returns
Index of the found key (includes count of all keys scanned before the key was found), or -1 if a key with this time is not found.

◆ GetKeyInfo()

void Maestro::CCompoundSplineTrack::GetKeyInfo ( int  keyIndex,
const char *&  description,
float &  duration 
) const
override

Get summary info about sub-tracks keys by key index. Index is elemental, should be inside keys counts in sub-tracks.

Parameters
keyIndexThe index specifying keys.
descriptionConcatenation of short human readable text descriptions of keys.
durationZeroed.

◆ GetKeyTime()

float Maestro::CCompoundSplineTrack::GetKeyTime ( int  keyIndex) const
override

Get time of a key found in sub-tracks with specified key index. Index is extended, includes count of all keys existing in sub-tracks before the needed key.

Returns
Key time, or -1 if a key with the index is not found.

◆ IsKeySelected()

bool Maestro::CCompoundSplineTrack::IsKeySelected ( int  keyIndex) const
override

Check if all keys in sub-tracks corresponding to the given index are selected (actually, keys with the time of a key found). Index is extended, includes count of all keys existing in sub-tracks before the needed key.

Returns
True if all keys in sub-tracks selected (have selected flag).

◆ SelectKey()

void Maestro::CCompoundSplineTrack::SelectKey ( int  keyIndex,
bool  select 
)
override

Select keys (set selected flag) to all keys at time corresponding to time of a key found with given index. Index is extended, includes count of all keys existing in sub-tracks before the needed key.

◆ SetKeyTime()

void Maestro::CCompoundSplineTrack::SetKeyTime ( int  keyIndex,
float  time 
)
override

Set time of a key found in sub-tracks with specified key index. Index is extended, includes count of all keys existing in sub-tracks before the needed key.


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