GH_Animator<T>

References
public class GH_Animator<T>
Provides methods for animating values.
TData type to animate.

Constructors

GH_Animator

#
public GH_Animator(T A, T B, DateTime startTime, DateTime endTime, Interpolate interpolator)
Create a new instance of the generic animator.
A (T)Start value of animation.
B (T)End value of animation.
startTime (DateTime)Start of animation, should be expressed in UTC time.
endTime (DateTime)End of animation, should be expressed in UTC time.
interpolator (GH_Animator<T>.Interpolate)Interpolation delegate.

GH_Animator

#
public GH_Animator(T A, T B, TimeSpan duration, Interpolate interpolator)
Create a new instance of the generic animator.
A (T)Start value of animation.
B (T)End value of animation.
duration (TimeSpan)Duration of animation.
interpolator (GH_Animator<T>.Interpolate)Interpolation delegate

Properties

Interpolation

#
public GH_Interpolation Interpolation { get; set; }
Gets or sets the interpolation mode. Changing the mode during an animation will result in discontinuous motion.

Phase

#
public GH_AnimationPhase Phase { get; }
Gets the current animation phase.

ValueA

#
public T ValueA { get; set; }
Gets or sets the start value of the animation. This value is set from within the constructor though you can change it at any time.

ValueB

#
public T ValueB { get; set; }
Gets or sets the end value of the animation. This value is set from within the constructor though you can change it at any time.

Methods

AdjustAnimation

#
public void AdjustAnimation(T newTarget, DateTime newStartTime, DateTime newEndTime)
Adjust the animation.
newTarget (T)New B value.
newStartTime (DateTime)
newEndTime (DateTime)

AdjustAnimation

#
public void AdjustAnimation(T newTarget, int duration)
Adjust the animation.
newTarget (T)New B value.
duration (int)Duration of adjusted animation in milliseconds.

AdjustAnimation

#
public void AdjustAnimation(T newTarget)
Adjust the animation.
newTarget (T)New B value.

CurrentValue

#
public T CurrentValue()
Gets the current animated value.