IAnimationT Interface |
Namespace: DigitalRune.Animation
The IAnimationT type exposes the following members.
Name | Description | |
---|---|---|
CreateBlendAnimation |
Creates a new BlendAnimationT. (For internal use only.)
(Inherited from IAnimation.) | |
CreateInstance |
Creates an animation instance that can be used to play back the animation.
(For internal use only.)
(Inherited from ITimeline.) | |
GetAnimationTime |
Gets the animation time for the specified time on the timeline.
(Inherited from ITimeline.) | |
GetState |
Gets the state of the animation for the specified time on the timeline.
(Inherited from ITimeline.) | |
GetTotalDuration |
Gets the total length of the timeline.
(Inherited from ITimeline.) | |
GetValue |
Gets the value of the animation at the specified time.
|
Name | Description | |
---|---|---|
FillBehavior |
Gets a value that specifies how the animation behaves when it reaches the end of its
duration.
(Inherited from ITimeline.) | |
TargetObject |
Gets the object to which the animation is applied by default.
(Inherited from ITimeline.) | |
TargetProperty |
Gets the property to which the animation is applied by default.
(Inherited from IAnimation.) | |
Traits |
Gets the traits of the animation values.
|
An animation in the traditional sense is the rapid display of images to create the illusion of movement. Here, in DigitalRune Animation, the term animation is used in a more general way: An animation determines the change of value over time.
Animations can be applied to all kinds of properties in an application. In a user-interface properties such as size, position, rotation, color, opacity, etc. can be animated to create interesting visual effects. In virtual worlds more complex animations can be used to control the motions of objects or virtual characters.
An animation defines the transition of a value over time. It is basically a function x = f(t) where the parameter t is called the animation time and the result x is the animation value. The method GetValue(TimeSpan, T, T, T) can be used to evaluate the animation value.
Target Object and Property: An animation can be applied to a property of a given object. The animation system allows to apply an animation to an object or a group of objects without explicitly specifying the property that should be animated. In this case the animation system automatically matches the target object and properties using the properties TargetObject and TargetProperty. TargetObject and TargetProperty are optional strings that can be set to identify the target.
For example, a TimelineGroup can be used to define a complex set of animations. Each animation is assigned to an object/property by setting TargetObject and TargetProperty. At runtime, when the TimelineGroup is started the animation system will automatically apply the animations to the matching objects.
The animation system first checks whether the property TargetObject is set and matches the name of any of the given objects. The animation system assumes that all objects have a unique name. Therefore, as soon as one match is found the animation system ignores all remaining objects/properties. If a match is found, it checks whether the object has a matching animatable property. If the property TargetObject is not set (the value is or an empty string), the animation system checks all objects for a matching property.
The animation system checks whether an animatable property matches the property TargetProperty and whether the type of the property is compatible with the animation. An animation is applied to the first matching property. If there are multiple potential matches the animation is only applied to the first match.
Note that timelines can be nested. In this case the parent's TargetObject or TargetProperty property overrides the values set by child animations. For example, if the property TargetObject is set in a TimelineGroup the value overrides the TargetObject properties of all child animations/timelines.
Additive Animations: Animations can be additive, meaning that the animation value is added to the target property. If there are multiple animation in an composition chain, the animation value will be added to the output of the previous stage. If the animation is the first animation in a composition chain, the animation value is added to the base value of the property that is being animated.