AnimationChannel

class AnimationChannel : System.Object, System.Collections.Generic.ICollection<AnimationKeyframe>, System.Collections.Generic.IEnumerable<AnimationKeyframe>, System.Collections.IEnumerable

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.

readonly int Count

Gets the number of keyframes in the collection.

readonly AnimationKeyframe Item
public int Add(AnimationKeyframe item)

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

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.AnimationKeyframe) – Keyframe to be added to the channel.
Returns:

Index of the new keyframe.

public void Clear()

Removes all keyframes from the collection.

public bool Contains(AnimationKeyframe item)

Searches the collection for the specified keyframe.

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.AnimationKeyframe) – Keyframe being searched for.
Returns:

true if the keyframe exists; false otherwise.

public int IndexOf(AnimationKeyframe item)

Determines the index for the specified keyframe.

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.AnimationKeyframe) – Identity of a keyframe.
Returns:

Index of the specified keyframe.

public bool Remove(AnimationKeyframe item)

Removes the specified keyframe from the collection.

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.AnimationKeyframe) – Keyframe being removed.
Returns:

true if the keyframe was removed; false otherwise.

public void RemoveAt(int index)

Removes the keyframe at the specified index position.

Parameters:
  • index (int) – Index of the keyframe being removed.
public System.Collections.Generic.IEnumerator<AnimationKeyframe> GetEnumerator()

Returns an enumerator that iterates through the keyframes.

Returns:Enumerator for the keyframe collection.