Plays back a clip of another animation.

Namespace: DigitalRune.Animation
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.1.0.0 (1.1.0.9503)

Syntax

C#
public class AnimationClip<T> : IAnimation<T>, 
	IAnimation, ITimeline
Visual Basic
Public Class AnimationClip(Of T) _
	Implements IAnimation(Of T), IAnimation, ITimeline
Visual C++
generic<typename T>
public ref class AnimationClip : IAnimation<T>, 
	IAnimation, ITimeline

Type Parameters

T
The type of the animation value.

Remarks

The AnimationClip<(Of <(<'T>)>)> has the following purposes:

  1. Select animation clip: The properties ClipStart and ClipEnd can be used to select an interval from another animation (see property Animation). The properties are optional: ClipStart and ClipEnd are nullNothingnullptra null reference (Nothing in Visual Basic) by default, which means that the entire animation is selected. It is also possible to set only ClipStart or ClipEnd - in this case only one side of the original animation will be clipped.

    The property ClipOffset defines a time offset which is applied when the animation clip is played back. If the selected clip is, for example, 10 seconds long and ClipOffset is 5 seconds, then the playback of the clip will start in the middle.

  2. Arrange animation clip on timeline: The properties Delay, Duration, Speed can be used to position the selected animation clip along the timeline: The start of the animation clip can be postponed using the property Delay. The duration of the animation can be overridden using the property Duration. Note that, when the duration exceeds the actual length of the clip than the clip is automatically repeated using a certain loop behavior (see below). The Speed defines the rate at which the animation clip is played back.

Loop Behavior: The property Duration defines the length of the playback. If the duration is not set (default value is nullNothingnullptra null reference (Nothing in Visual Basic)), the animation clip plays exactly once (clip length = ClipEnd - ClipStart). If the users sets a duration greater than the actual length of the clip, the clip is repeated using a certain loop behavior.

The property LoopBehavior defines the behavior past the end of the animation clip. The default loop behavior is Constant which means that the last value of the animation clip is returned for the rest of the duration. The loop behavior Cycle causes the animation clip to be repeated from the start. The loop behavior CycleOffset is similar to Cycle except that it also applies an offset to the animation values in each new iteration. The loop behavior Oscillate (also known as 'auto-reverse' or 'ping-pong') automatically repeats the animation clip in reverse order, so that the animation clip is played back and forth for the defined duration.

Inheritance Hierarchy

System..::..Object
  DigitalRune.Animation..::..AnimationClip<(Of <(<'T>)>)>

See Also