struct IAnimNode : virtual public _i_reference_target_t { enum ESupportedParamFlags { eSupportedParamFlags_MultipleTracks = 0x01 }; };
IMovieSystem.h
can host multiple animation tracks, and execute them other time. Animation node is reference counted.
enum ESupportedParamFlags { eSupportedParamFlags_MultipleTracks = 0x01 };
IMovieSystem.h
Members |
Description |
eSupportedParamFlags_MultipleTracks = 0x01 |
Set if parameter can be assigned multiple tracks. |
Supported params.
virtual ~IAnimNode();
virtual void Activate(bool bActivate) = 0;
Called when sequence is activated / deactivated
virtual void AddTrack(IAnimTrack * pTrack) = 0;
Remove track from anim node.
virtual void Animate(SAnimContext & ec) = 0;
! Evaluate animation to the given time.
virtual void CreateDefaultTracks() = 0;
Creates default set of tracks supported by this node.
virtual IAnimTrack* CreateTrack(const CAnimParamType & paramType) = 0;
Creates a new track for given parameter.
virtual IEntity* GetEntity() = 0;
Query entity of this node, if assigned.
virtual EntityGUID* GetEntityGuid() = 0;
Retrieve a pointer to the entity Guid, return NULL if it is not an entity targeting node.
virtual int GetFlags() const = 0;
Get AnimNode flags. @return flags set on node. @see EAnimNodeFlags
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
collect allocated memory
virtual IMovieSystem* GetMovieSystem() = 0;
Return movie system that created this node.
virtual const char* GetName() = 0;
! Get node name.
virtual IAnimNodeOwner* GetNodeOwner() = 0;
virtual unsigned int GetParamCount() const = 0;
Number of supported parameters.
Returns number of supported parameters by this animation node (position,rotation,scale,etc..).
virtual ESupportedParamFlags GetParamFlags(const CAnimParamType & paramType) const = 0;
Returns the params value type
virtual const char * GetParamName(const CAnimParamType & paramType) const = 0;
Parameters |
Description |
const CAnimParamType & paramType |
parameter id |
Returns name of supported parameter of this animation node or NULL if not available
virtual CAnimParamType GetParamType(unsigned int nIndex) const = 0;
Parameters |
Description |
unsigned int nIndex |
parameter index in range 0 <= nIndex < GetSupportedParamCount() |
Returns the type of a param by index
virtual bool GetParamValue(float time, CAnimParamType param, Vec3 & value) = 0;
virtual bool GetParamValue(float time, CAnimParamType param, Vec4 & value) = 0;
virtual bool GetParamValue(float time, CAnimParamType param, float & value) = 0;
Get float/vec3/vec4 parameter at given time. @return true if parameter exist, false if this parameter not exist in node.
virtual EAnimValue GetParamValueType(const CAnimParamType & paramType) const = 0;
Returns the params value type
virtual IAnimNode* GetParent() const = 0;
virtual Vec3 GetPos() = 0;
! Get current entity position.
virtual Quat GetRotate() = 0;
! Get current entity rotation.
virtual Vec3 GetScale() = 0;
! Get current entity scale.
virtual IAnimSequence* GetSequence() = 0;
Return Animation Sequence that owns this node.
virtual bool GetShakeRotation(const float & time, Quat & rot);
Used by AnimCameraNode
virtual IAnimTrack* GetTrackByIndex(int nIndex) const = 0;
Return track assigned to the specified parameter.
virtual int GetTrackCount() const = 0;
Working with Tracks.
virtual IAnimTrack* GetTrackForParameter(const CAnimParamType & paramType) const = 0;
Return first track assigned to the specified parameter.
virtual IAnimTrack* GetTrackForParameter(const CAnimParamType & paramType, uint32 index) const = 0;
Return the i-th track assigned to the specified parameter in case of multiple tracks.
virtual uint32 GetTrackParamIndex(const IAnimTrack * pTrack) const = 0;
Get the index of a given track among tracks with the same parameter type in this node.
virtual EAnimNodeType GetType() const = 0;
Get Type of this node.
virtual IAnimNode * HasDirectorAsParent() const = 0;
virtual void InitializeTrackDefaultValue(IAnimTrack * pTrack, const CAnimParamType & paramType) = 0;
Initializes track default values after de-serialization / user creation. Only called in editor.
virtual bool IsParamValid(const CAnimParamType & paramType) const = 0;
Check if parameter is supported by this node.
virtual bool NeedToRender() const = 0;
virtual bool RemoveTrack(IAnimTrack * pTrack) = 0;
Remove track from anim node.
virtual void Render() = 0;
virtual void Serialize(XmlNodeRef & xmlNode, bool bLoading, bool bLoadEmptyTracks) = 0;
Serialize this animation node to XML.
virtual void SetCameraShakeSeed(const uint shakeSeed);
virtual void SetEntityGuid(const EntityGUID & guid) = 0;
Assign an entity guid to the node, (Only for Entity targeting nodes)
virtual void SetEntityGuidSource(const EntityGUID & guid) = 0;
virtual void SetEntityGuidTarget(const EntityGUID & guid) = 0;
Assign an entities guides to the lookAt nodes
virtual void SetEntityId(const int entityId);
Override the entity ID of a node (only called from game)
virtual void SetFlags(int flags) = 0;
Set AnimNode flags. @param flags One or more flags from EAnimNodeFlags. @see EAnimNodeFlags
virtual void SetName(const char * name) = 0;
virtual void SetNodeOwner(IAnimNodeOwner * pOwner) = 0;
Callback for animation node used by editor. Register notification callback with animation node.
virtual bool SetParamValue(float time, CAnimParamType param, const Vec3 & value) = 0;
virtual bool SetParamValue(float time, CAnimParamType param, const Vec4 & value) = 0;
virtual bool SetParamValue(float time, CAnimParamType param, float value) = 0;
General Set param. Set float/vec3/vec4 parameter at given time. @return true if parameter set, false if this parameter not exist in node.
virtual void SetParent(IAnimNode* pParent) = 0;
Groups interface
virtual void SetPos(float time, const Vec3 & pos) = 0;
Space position/orientation scale. /////////////////////////////////////////////////////////////////////// ! Translate entity node.
virtual void SetRotate(float time, const Quat & quat) = 0;
! Rotate entity node.
virtual void SetScale(float time, const Vec3 & scale) = 0;
! Scale entity node.
virtual void SetTimeRange(Range timeRange) = 0;
Set time range for all tracks in this sequence.
virtual void SetTrack(const CAnimParamType & paramType, IAnimTrack * track) = 0;
Assign animation track to parameter. if track parameter is NULL track with parameter id param will be removed.
virtual void StillUpdate() = 0;
! Evaluate animation node while not playing animation.
virtual void UpdateDynamicParams() = 0;
Called from editor if dynamic params need updating