Table of Contents

Class AnimationChannel

Namespace
Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly
MonoGame.Framework.Content.Pipeline.dll

Provides methods and properties for maintaining an animation channel. An animation channel is a collection of keyframes describing the movement of a single bone or rigid object.

public sealed class AnimationChannel : ICollection<AnimationKeyframe>, IEnumerable<AnimationKeyframe>, IEnumerable
Inheritance
AnimationChannel
Implements
Inherited Members

Constructors

AnimationChannel()

Initializes a new instance of AnimationChannel.

public AnimationChannel()

Properties

Count

Gets the number of keyframes in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets the keyframe at the specified index position.

public AnimationKeyframe this[int index] { get; }

Parameters

index int

Property Value

AnimationKeyframe

Methods

Add(AnimationKeyframe)

Adds a new keyframe to the collection, automatically sorting the contents according to keyframe times.

public int Add(AnimationKeyframe item)

Parameters

item AnimationKeyframe

Keyframe to be added to the channel.

Returns

int

Index of the new keyframe.

Clear()

Removes all keyframes from the collection.

public void Clear()

Contains(AnimationKeyframe)

Searches the collection for the specified keyframe.

public bool Contains(AnimationKeyframe item)

Parameters

item AnimationKeyframe

Keyframe being searched for.

Returns

bool

true if the keyframe exists; false otherwise.

GetEnumerator()

Returns an enumerator that iterates through the keyframes.

public IEnumerator<AnimationKeyframe> GetEnumerator()

Returns

IEnumerator<AnimationKeyframe>

Enumerator for the keyframe collection.

IndexOf(AnimationKeyframe)

Determines the index for the specified keyframe.

public int IndexOf(AnimationKeyframe item)

Parameters

item AnimationKeyframe

Identity of a keyframe.

Returns

int

Index of the specified keyframe.

Remove(AnimationKeyframe)

Removes the specified keyframe from the collection.

public bool Remove(AnimationKeyframe item)

Parameters

item AnimationKeyframe

Keyframe being removed.

Returns

bool

true if the keyframe was removed; false otherwise.

RemoveAt(int)

Removes the keyframe at the specified index position.

public void RemoveAt(int index)

Parameters

index int

Index of the keyframe being removed.