IAnimTrack

C++
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)
  };
};
File

IMovieSystem.h

Description

Interface of Animation Track.

IAnimTrack::EAnimTrackFlags Enumeration
C++
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)
};
File

IMovieSystem.h

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

! Flags that can be set on animation track.

IAnimTrack::~IAnimTrack Destructor
C++
virtual ~IAnimTrack();
IAnimTrack::Animate Method
C++
virtual void Animate(SAnimContext & ec);
Description

! For custom track animate parameters.

IAnimTrack::CloneKey Method
C++
virtual int CloneKey(int key) = 0;
Description

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

IAnimTrack::CopyKey Method
C++
virtual int CopyKey(IAnimTrack * pFromTrack, int nFromKey) = 0;
Description

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

IAnimTrack::CreateKey Method
C++
virtual int CreateKey(float time) = 0;
Description

! Create key at given time, and return its index. ! @return Index of new key.

IAnimTrack::FindKey Method
C++
virtual int FindKey(float time) = 0;
Description

! Find key at given time. ! @return Index of found key, or -1 if key with this time not found.

IAnimTrack::GetAnimationLayerIndex Method
C++
virtual int GetAnimationLayerIndex() const;
Description

! Get the animation layer index assigned. (only for character/look-at tracks ATM)

IAnimTrack::GetCurveType Method
C++
virtual EAnimCurveType GetCurveType() = 0;
IAnimTrack::GetFlags Method
C++
virtual int GetFlags() = 0;
Description

! Get track flags.

IAnimTrack::GetKey Method
C++
virtual void GetKey(int index, IKey * key) const = 0;
Description

! Get key at specified location. ! @param key Must be valid pointer to compatable key structure, to be filled with specified key location.

IAnimTrack::GetKeyFlags Method
C++
virtual int GetKeyFlags(int index) = 0;
Description

! Get flags of specified key. ! @return key time.

IAnimTrack::GetKeyInfo Method
C++
virtual void GetKeyInfo(int key, const char* & description, float & duration) = 0;
Description

! Get info about specified key. ! @param Short human readable text description of this key. ! @param duration of this key in seconds.

IAnimTrack::GetKeyTime Method
C++
virtual float GetKeyTime(int index) const = 0;
Description

! Get time of specified key. ! @return key time.

IAnimTrack::GetKeyValueRange Method
C++
virtual void GetKeyValueRange(float& fMin, float& fMax) const = 0;
IAnimTrack::GetMemoryUsage Method
C++
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
Description

collect memory informations

IAnimTrack::GetNumKeys Method
C++
virtual int GetNumKeys() const = 0;
Description

! Return number of keys in track.

IAnimTrack::GetParameterType Method
C++
virtual CAnimParamType GetParameterType() const = 0;
Description

Return what parameter of the node, this track is attached to.

IAnimTrack::GetSpline Method
C++
virtual ISplineInterpolator* GetSpline() const;
Description

Get access to the internal spline of the track.

IAnimTrack::GetSubTrack Method
C++
virtual IAnimTrack* GetSubTrack(int nIndex) const = 0;
Description

Retrieve pointer the specfied sub track.

IAnimTrack::GetSubTrackCount Method
C++
virtual int GetSubTrackCount() const = 0;
Description

Animation track can contain sub-tracks (Position XYZ anim track have sub-tracks for x,y,z) Get count of sub tracks.

IAnimTrack::GetSubTrackName Method
C++
virtual const char* GetSubTrackName(int nIndex) const = 0;
IAnimTrack::GetValue Method (float, Quat &)
C++
virtual void GetValue(float time, Quat & value) = 0;
IAnimTrack::GetValue Method (float, Vec3 &)
C++
virtual void GetValue(float time, Vec3 & value) = 0;
IAnimTrack::GetValue Method (float, Vec4 &)
C++
virtual void GetValue(float time, Vec4 & value) = 0;
IAnimTrack::GetValue Method (float, bool &)
C++
virtual void GetValue(float time, bool & value) = 0;
IAnimTrack::GetValue Method (float, float &)
C++
virtual void GetValue(float time, float & value) = 0;
Description

Get track value at specified time. Interpolates keys if needed.

IAnimTrack::GetValueType Method
C++
virtual EAnimValue GetValueType() = 0;
IAnimTrack::HasKeys Method
C++
virtual bool HasKeys() const = 0;
Description

! Return true if keys exists in this track

IAnimTrack::IsKeySelected Method
C++
virtual bool IsKeySelected(int key) const;
IAnimTrack::IsMasked Method
C++
virtual bool IsMasked(const uint32 mask) const = 0;
Description

! Check if track is masked by mask

Todo

Mask should be stored with dynamic length

IAnimTrack::NextKeyByTime Method
C++
virtual int NextKeyByTime(int key) const;
Description

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

IAnimTrack::OffsetKeyPosition Method
C++
virtual void OffsetKeyPosition(const Vec3 & value) = 0;
Description

Only for position tracks, offset all track keys by this amount.

IAnimTrack::RemoveKey Method
C++
virtual void RemoveKey(int num) = 0;
Description

! Remove specified key.

IAnimTrack::SelectKey Method
C++
virtual void SelectKey(int key, bool select);
IAnimTrack::Serialize Method
C++
virtual bool Serialize(XmlNodeRef & xmlNode, bool bLoading, bool bLoadEmptyTracks = true) = 0;
Description

Serialize this animation track to XML.

IAnimTrack::SerializeSelection Method
C++
virtual bool SerializeSelection(XmlNodeRef & xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) = 0;
IAnimTrack::SetAnimationLayerIndex Method
C++
virtual void SetAnimationLayerIndex(int index);
Description

! Set the animation layer index. (only for character/look-at tracks ATM)

IAnimTrack::SetFlags Method
C++
virtual void SetFlags(int flags) = 0;
Description

! Set track flags.

IAnimTrack::SetKey Method
C++
virtual void SetKey(int index, IKey * key) = 0;
Description

! Set key at specified location. ! @param key Must be valid pointer to compatable key structure.

IAnimTrack::SetKeyFlags Method
C++
virtual void SetKeyFlags(int index, int flags) = 0;
Description

! Set flags of specified key.

IAnimTrack::SetKeyTime Method
C++
virtual void SetKeyTime(int index, float time) = 0;
Description

! Set time of specified key.

IAnimTrack::SetKeyValueRange Method
C++
virtual void SetKeyValueRange(float fMin, float fMax) = 0;
IAnimTrack::SetNumKeys Method
C++
virtual void SetNumKeys(int numKeys) = 0;
Description

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

IAnimTrack::SetParameterType Method
C++
virtual void SetParameterType(CAnimParamType type) = 0;
Description

Assign node parameter ID for this track.

IAnimTrack::SetSubTrackName Method
C++
virtual void SetSubTrackName(int nIndex, const char * name) = 0;
IAnimTrack::SetTimeRange Method
C++
virtual void SetTimeRange(const Range & timeRange) = 0;
Description

Assign active time range for this track.

IAnimTrack::SetValue Method (float, Quat &, bool)
C++
virtual void SetValue(float time, const Quat & value, bool bDefault = false) = 0;
IAnimTrack::SetValue Method (float, Vec3 &, bool)
C++
virtual void SetValue(float time, const Vec3 & value, bool bDefault = false) = 0;
IAnimTrack::SetValue Method (float, Vec4 &, bool)
C++
virtual void SetValue(float time, const Vec4 & value, bool bDefault = false) = 0;
IAnimTrack::SetValue Method (float, bool &, bool)
C++
virtual void SetValue(float time, const bool & value, bool bDefault = false) = 0;
IAnimTrack::SetValue Method (float, float &, bool)
C++
virtual void SetValue(float time, const float & value, bool bDefault = false) = 0;
Description

Set track value at specified time. Adds new keys if required.

IAnimTrack::SortKeys Method
C++
virtual void SortKeys() = 0;
Description

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