Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.1.0.0 (1.1.0.9503)
Syntax
| C# |
|---|
public abstract class KeyFrameAnimation<T> : Animation<T> |
| Visual Basic |
|---|
Public MustInherit Class KeyFrameAnimation(Of T) _ Inherits Animation(Of T) |
| Visual C++ |
|---|
generic<typename T> public ref class KeyFrameAnimation abstract : public Animation<T> |
Type Parameters
- T
- The type of the animation value.
Remarks
A key frame animation contains a list of key frames (see property KeyFrames) that define the animation values at certain points in time. When the animation is played the class automatically looks up the animation value in the list of key frames.
Key Frame Interpolation: The property EnableInterpolation defines whether interpolation between key frames is enabled. When the property is set (default) the values between two key frames are interpolated. Each key frame animation class decides which type of a interpolation is most appropriate. For example, linear interpolation (LERP) is used for Single, Vector2F, Vector3F, etc. LERP is also used for QuaternionF (Spherical linear interpolation (SLERP) is not used for performance reasons). When interpolation is disabled, the animation returns the value of the previous key frame.
Please note that key frame animations (such as SingleKeyFrameAnimation, Vector2FKeyFrameAnimation, Vector3FKeyFrameAnimation, etc.) provide only limited control over interpolation between key frames. Curve-based animations (such as Curve2FAnimation, Path2FAnimation, Path3FAnimation, etc.) offer more advanced control: Curve-based animations allow to define an interpolation spline for each segment of the animation.
Cyclic Animations: A key frame animation, by default, runs until the last key frame is reached. The types TimelineClip and AnimationClip<(Of <(<'T>)>)> can be used to repeat the entire key frame animation (or a certain clip) for a number of times using a certain loop-behavior (see LoopBehavior).
Important: The key frame animation requires that the key frames are sorted ascending by their time value. The method Sort()()()() can be called to sort all key frames.
Inheritance Hierarchy
DigitalRune.Animation..::..Animation<(Of <(<'T>)>)>
DigitalRune.Animation..::..KeyFrameAnimation<(Of <(<'T>)>)>
DigitalRune.Animation..::..AvatarExpressionKeyFrameAnimation
DigitalRune.Animation..::..ColorKeyFrameAnimation
DigitalRune.Animation..::..QuaternionFKeyFrameAnimation
DigitalRune.Animation..::..QuaternionKeyFrameAnimation
DigitalRune.Animation..::..SingleKeyFrameAnimation
DigitalRune.Animation..::..SrtKeyFrameAnimation
DigitalRune.Animation..::..Vector2FKeyFrameAnimation
DigitalRune.Animation..::..Vector2KeyFrameAnimation
DigitalRune.Animation..::..Vector3FKeyFrameAnimation
DigitalRune.Animation..::..Vector3KeyFrameAnimation
DigitalRune.Animation..::..Vector4FKeyFrameAnimation
DigitalRune.Animation..::..Vector4KeyFrameAnimation