Click or drag to resize
DigitalRuneCurve2FAnimation Class
Animates a Single value using a predefined animation curve.
Inheritance Hierarchy
SystemObject
  DigitalRune.AnimationAnimationSingle
    DigitalRune.AnimationAnimationCurveSingle, Vector2F, CurveKey2F, Curve2F
      DigitalRune.AnimationCurve2FAnimation

Namespace: DigitalRune.Animation
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public class Curve2FAnimation : AnimationCurve<float, Vector2F, CurveKey2F, Curve2F>

The Curve2FAnimation type exposes the following members.

Constructors
  NameDescription
Public methodCurve2FAnimation
Initializes a new instance of the Curve2FAnimation class.
Public methodCurve2FAnimation(Curve2F)
Initializes a new instance of the Curve2FAnimation class with the given curve.
Top
Methods
  NameDescription
Public methodCreateBlendAnimation (Inherited from AnimationT.)
Public methodCreateInstance
Creates an animation instance that can be used to play back the animation. (For internal use only.)
(Inherited from AnimationT.)
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.
(Inherited from AnimationT.)
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.
(Inherited from AnimationT.)
Public methodGetTotalDuration
Gets the total length of the timeline.
(Inherited from AnimationCurveTValue, TPoint, TCurveKey, TCurve.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Gets the value of the animation at the specified time.
(Inherited from AnimationT.)
Protected methodGetValueCore
Evaluates the animation function at the specified animation time.
(Inherited from AnimationCurveTValue, TPoint, TCurveKey, TCurve.)
Protected methodGetValueFromPoint
Gets the animation value from a given point on the curve.
(Overrides AnimationCurveTValue, TPoint, TCurveKey, TCurveGetValueFromPoint(TPoint).)
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 propertyCurve
Gets or sets the curve that defines the animation.
(Inherited from AnimationCurveTValue, TPoint, TCurveKey, TCurve.)
Public propertyEndParameter
Gets or sets the end parameter.
(Inherited from AnimationCurveTValue, TPoint, TCurveKey, TCurve.)
Public propertyFillBehavior
Gets or sets a value that specifies how the animation behaves when it reaches the end of its duration.
(Inherited from AnimationT.)
Public propertyIsAdditive
Gets or sets a value indicating whether the output of the animation is added to the current value of the property that is being animated.
(Inherited from AnimationT.)
Public propertyStartParameter
Gets or sets the start parameter.
(Inherited from AnimationCurveTValue, TPoint, TCurveKey, TCurve.)
Public propertyTargetObject
Gets or sets the object to which the animation is applied by default.
(Inherited from AnimationT.)
Public propertyTargetProperty
Gets or sets the property to which the animation is applied by default.
(Inherited from AnimationT.)
Public propertyTraits
Gets the traits of the animation values.
(Overrides AnimationTTraits.)
Top
Remarks

The animation curve (see property Curve) contains several curve keys (also known as 'key frames') that define the change of the value. The curve parameter is the animation time. A curve key defines the current value at a certain point in time. It also defines the type of interpolation that is used for the segment between the current and the next curve key. All relevant types of spline-based interpolations can be used for the curve segments.

Duration: An animation curve, by default, runs from the start (curve parameter = 0) until the last curve key is reached. The parameter of the last curve key determines the natural duration of the animation. The optional properties StartParameter and EndParameter can be used to explicitly define which part of the animation curve should be played.

Loop Behavior: When the StartParameter is less than the parameter of the first curve key or EndParameter is greater than the parameter of the last curve key then the curve is automatically repeated using a certain loop behavior. The loop behavior can be defined using the properties PreLoop and PostLoop of the Curve.

Important: The animation curve requires that the curve keys are sorted ascending by their parameter (time value). The method Sort can be called to sort all curve keys.

See Also