struct IAnimTrack : public _i_reference_target_t { enum EAnimTrackFlags { eAnimTrackFlags_Linear = BIT(1), eAnimTrackFlags_Loop = BIT(2), eAnimTrackFlags_Cycle = BIT(3), eAnimTrackFlags_Disabled = BIT(4), eAnimTrackFlags_Hidden = BIT(5), eAnimTrackFlags_Muted = BIT(8) }; };
IMovieSystem.h
Interface of Animation Track.
enum EAnimTrackFlags { eAnimTrackFlags_Linear = BIT(1), eAnimTrackFlags_Loop = BIT(2), eAnimTrackFlags_Cycle = BIT(3), eAnimTrackFlags_Disabled = BIT(4), eAnimTrackFlags_Hidden = BIT(5), eAnimTrackFlags_Muted = BIT(8) };
IMovieSystem.h
Members |
Description |
eAnimTrackFlags_Linear = BIT(1) |
!< Use only linear interpolation between keys. |
eAnimTrackFlags_Loop = BIT(2) |
!< Play this track in a loop. |
eAnimTrackFlags_Cycle = BIT(3) |
!< Cycle track. |
eAnimTrackFlags_Disabled = BIT(4) |
!< Disable this track. |
eAnimTrackFlags_Hidden = BIT(5) |
!< Set when track is hidden in track view. |
eAnimTrackFlags_Muted = BIT(8) |
!< Mute this sound track. This only affects the playback in editor. |
! Flags that can be set on animation track.
virtual ~IAnimTrack();
virtual void Animate(SAnimContext & ec);
! For custom track animate parameters.
virtual int CloneKey(int key) = 0;
! Clone key at specified index. ! @retun Index of new key.
virtual int CopyKey(IAnimTrack * pFromTrack, int nFromKey) = 0;
! Clone key at specified index from another track of SAME TYPE. ! @retun Index of new key.
virtual int CreateKey(float time) = 0;
! Create key at given time, and return its index. ! @return Index of new key.
virtual int FindKey(float time) = 0;
! Find key at given time. ! @return Index of found key, or -1 if key with this time not found.
virtual int GetAnimationLayerIndex() const;
! Get the animation layer index assigned. (only for character/look-at tracks ATM)
virtual EAnimCurveType GetCurveType() = 0;
virtual int GetFlags() = 0;
! Get track flags.
virtual void GetKey(int index, IKey * key) const = 0;
! Get key at specified location. ! @param key Must be valid pointer to compatable key structure, to be filled with specified key location.
virtual int GetKeyFlags(int index) = 0;
! Get flags of specified key. ! @return key time.
virtual void GetKeyInfo(int key, const char* & description, float & duration) = 0;
! Get info about specified key. ! @param Short human readable text description of this key. ! @param duration of this key in seconds.
virtual float GetKeyTime(int index) const = 0;
! Get time of specified key. ! @return key time.
virtual void GetKeyValueRange(float& fMin, float& fMax) const = 0;
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
collect memory informations
virtual int GetNumKeys() const = 0;
! Return number of keys in track.
virtual CAnimParamType GetParameterType() const = 0;
Return what parameter of the node, this track is attached to.
virtual ISplineInterpolator* GetSpline() const;
Get access to the internal spline of the track.
virtual IAnimTrack* GetSubTrack(int nIndex) const = 0;
Retrieve pointer the specfied sub track.
virtual int GetSubTrackCount() const = 0;
Animation track can contain sub-tracks (Position XYZ anim track have sub-tracks for x,y,z) Get count of sub tracks.
virtual const char* GetSubTrackName(int nIndex) const = 0;
virtual void GetValue(float time, Quat & value) = 0;
virtual void GetValue(float time, Vec3 & value) = 0;
virtual void GetValue(float time, Vec4 & value) = 0;
virtual void GetValue(float time, bool & value) = 0;
virtual void GetValue(float time, float & value) = 0;
Get track value at specified time. Interpolates keys if needed.
virtual EAnimValue GetValueType() = 0;
virtual bool HasKeys() const = 0;
! Return true if keys exists in this track
virtual bool IsKeySelected(int key) const;
virtual bool IsMasked(const uint32 mask) const = 0;
! Check if track is masked by mask
Mask should be stored with dynamic length
virtual int NextKeyByTime(int key) const;
! Return the index of the key which lies right after the given key in time. ! @param key Index of of key. ! @return Index of the next key in time. If the last key given, this returns -1. In case of keys sorted, it's just 'key+1', but if not sorted, it can be another value.
virtual void OffsetKeyPosition(const Vec3 & value) = 0;
Only for position tracks, offset all track keys by this amount.
virtual void RemoveKey(int num) = 0;
! Remove specified key.
virtual void SelectKey(int key, bool select);
virtual bool Serialize(XmlNodeRef & xmlNode, bool bLoading, bool bLoadEmptyTracks = true) = 0;
Serialize this animation track to XML.
virtual bool SerializeSelection(XmlNodeRef & xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) = 0;
virtual void SetAnimationLayerIndex(int index);
! Set the animation layer index. (only for character/look-at tracks ATM)
virtual void SetFlags(int flags) = 0;
! Set track flags.
virtual void SetKey(int index, IKey * key) = 0;
! Set key at specified location. ! @param key Must be valid pointer to compatable key structure.
virtual void SetKeyFlags(int index, int flags) = 0;
! Set flags of specified key.
virtual void SetKeyTime(int index, float time) = 0;
! Set time of specified key.
virtual void SetKeyValueRange(float fMin, float fMax) = 0;
virtual void SetNumKeys(int numKeys) = 0;
! Set number of keys in track. ! If needed adds empty keys at end or remove keys from end.
virtual void SetParameterType(CAnimParamType type) = 0;
Assign node parameter ID for this track.
virtual void SetSubTrackName(int nIndex, const char * name) = 0;
virtual void SetTimeRange(const Range & timeRange) = 0;
Assign active time range for this track.
virtual void SetValue(float time, const Quat & 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 bool & value, bool bDefault = false) = 0;
virtual void SetValue(float time, const float & value, bool bDefault = false) = 0;
Set track value at specified time. Adds new keys if required.
virtual void SortKeys() = 0;
! Sort keys in track (after time of keys was modified).