Click or drag to resize
DigitalRuneTimelineClip Class
Plays back a clip of another animation timeline.
Inheritance Hierarchy
SystemObject
  DigitalRune.AnimationTimelineClip

Namespace: DigitalRune.Animation
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public class TimelineClip : ITimeline

The TimelineClip type exposes the following members.

Constructors
  NameDescription
Public methodTimelineClip
Initializes a new instance of the TimelineClip class.
Public methodTimelineClip(ITimeline)
Initializes a new instance of the TimelineClip class for the given timeline.
Top
Methods
  NameDescription
Public methodCreateInstance
Creates an animation instance that can be used to play back the animation. (For internal use only.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAnimationTime
Gets the animation time for the specified time on the timeline.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetState
Gets the state of the animation for the specified time on the timeline.
Public methodGetTotalDuration
Gets the total length of the timeline.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyClipEnd
Gets or sets the end time of the animation clip.
Public propertyClipOffset
Gets the time offset that is applied to the selected animation clip.
Public propertyClipStart
Gets or sets the start time of the animation clip.
Public propertyDelay
Gets or sets the time at which the animation clip begins.
Public propertyDuration
Gets or sets the duration for which the animation clip is played.
Public propertyFillBehavior
Gets or sets a value that specifies how the animation behaves when it reaches the end of its duration.
Public propertyIsClipReversed
Gets or sets a value indicating whether to play the clip in reverse.
Public propertyLoopBehavior
Gets or sets the behavior of the animation past the end of the animation clip.
Public propertySpeed
Gets or sets the speed ratio at which the animation clip is played.
Public propertyTargetObject
Gets or sets the object to which the animation is applied by default.
Public propertyTimeline
Gets or sets the original animation timeline from which a clip is played back.
Top
Remarks

The TimelineClip has the following purposes:

  1. Select animation clip: The properties ClipStart and ClipEnd can be used to select an interval from another animation timeline (see property Timeline). The properties are optional: ClipStart and ClipEnd are by default, which means that the entire animation timeline is selected. It is also possible to set only ClipStart or ClipEnd - in this case only one side of the original animation timeline 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 ), 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 clip. The default loop behavior is Constant which means that the last value of the clip is returned for the rest of the duration. The loop behavior Cycle causes the clip to be repeated from the start. The loop behavior Oscillate (also known as 'auto-reverse' or 'ping-pong') automatically repeats the clip in reverse order, so that the clip is played back and forth for the defined duration.

Note that the loop behavior CycleOffset is not supported. This behavior is only available for animations of a certain type (use AnimationClipT instead).

See Also