Class AnimationClip
An animation clip.
Inherited Members
Namespace: Evergine.Framework.Animation
Assembly: Evergine.Framework.dll
Syntax
public class AnimationClip
Fields
Channels
Animation channels.
Declaration
public List<AnimationChannel> Channels
Field Value
Type | Description |
---|---|
List<AnimationChannel> |
ChannelsByKey
Channels by key;.
Declaration
public Dictionary<string, AnimationChannel> ChannelsByKey
Field Value
Type | Description |
---|---|
Dictionary<string, AnimationChannel> |
Duration
The animation duration.
Declaration
public float Duration
Field Value
Type | Description |
---|---|
float |
Events
Gets or sets the animated keyframe events.
Declaration
public SortedList<float, AnimationKeyframeEvent> Events
Field Value
Type | Description |
---|---|
SortedList<float, AnimationKeyframeEvent> |
Framerate
Frames per second of this animation.
Declaration
public float Framerate
Field Value
Type | Description |
---|---|
float |
InPlaceMode
Animation in place mode.
Declaration
public AnimationInPlaceMode InPlaceMode
Field Value
Type | Description |
---|---|
AnimationInPlaceMode |
Name
The name.
Declaration
public string Name
Field Value
Type | Description |
---|---|
string |
RootMotionNodeIndex
The root node index.
Declaration
public int RootMotionNodeIndex
Field Value
Type | Description |
---|---|
int |
RootMotionPositionChannel
Root motion position channel.
Declaration
public AnimationChannel RootMotionPositionChannel
Field Value
Type | Description |
---|---|
AnimationChannel |
RootMotionRotationChannel
Root motion rotation channel.
Declaration
public AnimationChannel RootMotionRotationChannel
Field Value
Type | Description |
---|---|
AnimationChannel |
Type
Animation type.
Declaration
public AnimationClipType Type
Field Value
Type | Description |
---|---|
AnimationClipType |
Properties
IsInitialized
Gets a value indicating whether this curve is initialized.
Declaration
public bool IsInitialized { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
AddChannel(AnimationChannel)
Add a channel.
Declaration
public void AddChannel(AnimationChannel channel)
Parameters
Type | Name | Description |
---|---|---|
AnimationChannel | channel | The channel. |
ComputeRootMotion(Matrix4x4)
Initialize some values.
Declaration
public void ComputeRootMotion(Matrix4x4 rootMotionNodeWorldTransform)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | rootMotionNodeWorldTransform | The root motion world transform. |
GetSample(float, AnimationSample, AnimationTrackContext, float, int)
Gets the animation sample by time.
Declaration
public void GetSample(float time, AnimationSample sample, AnimationTrackContext context, float playbackRate = 1, int loopCount = 0)
Parameters
Type | Name | Description |
---|---|---|
float | time | The time. |
AnimationSample | sample | The sample to store the info. |
AnimationTrackContext | context | The current animation execution context. |
float | playbackRate | The playback rate. |
int | loopCount | The loop count. |
GetSample(float, AnimationSample, float, int)
Gets the animation sample by time.
Declaration
public void GetSample(float time, AnimationSample sample, float playbackRate = 1, int loopCount = 0)
Parameters
Type | Name | Description |
---|---|---|
float | time | The time. |
AnimationSample | sample | The sample to store the info. |
float | playbackRate | The playback rate. |
int | loopCount | The loop count. |
GetSubAnimation(string, float, float)
Gets a fragment of the animation.
Declaration
public AnimationClip GetSubAnimation(string name, float startTime, float endTime)
Parameters
Type | Name | Description |
---|---|---|
string | name | The animation name. |
float | startTime | The start time. |
float | endTime | The end time. |
Returns
Type | Description |
---|---|
AnimationClip | The sub animation. |
Initialize()
Initialize this track.
Declaration
public void Initialize()
RemoveChannel(AnimationChannel)
Remove this channel.
Declaration
public bool RemoveChannel(AnimationChannel channel)
Parameters
Type | Name | Description |
---|---|---|
AnimationChannel | channel | The channel. |
Returns
Type | Description |
---|---|
bool | True if this channel has been removed susscessfully. |
SubstractSample(AnimationSample)
Substract a sample.
Declaration
public void SubstractSample(AnimationSample referenceSample)
Parameters
Type | Name | Description |
---|---|---|
AnimationSample | referenceSample | The reference frame. |