Click or drag to resize
Ab4d.SharpEngine logo

AnimationT Class

Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Animation
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public abstract class Animation<T> : IAnimation
where T : class

Type Parameters

T

The AnimationT type exposes the following members.

Constructors
 NameDescription
Protected methodAnimationTInitializes a new instance of the AnimationT class
Top
Properties
 NameDescription
Public propertyDirection 
Public propertyDuration Duration of one animation loop in milliseconds. If duration has not been explicitly set using the SetDuration(Single) or SetDuration(FuncT, Int32, Int32, Single) methods, the duration is determined by length of the animation tracks (elements). If duration has been explicitly set, all tracks are temporally scaled to the specified length, so the estimated duration should also equal to the specified one. The duration estimate becomes available (valid) only after animation is started and tracks are finalized.
Public propertyEasingFunction 
Public propertyIsAutomaticallyUpdating When true (by default) then the animation is automatically subscribed to SceneUpdating event on Scene or SceneView object. When false, then user must manually call Update or Update(Single) methods. This property must be set before the animation is started.
Public propertyIsInitialized True after animation is initialized using the Initialize method.
Public propertyIsRunning True when the animation is running (has been started).
Public propertyIsUsingExistingStandardTransform When true than an existing transformation on SceneNode will be animated (by default). When false, then each start of animation will add a new StandardTransformation object to the SceneNode's Transform.
Public propertyLoop When false (by default) the animation is played only once. When true the animation is repeated. By default the animation is repeated indefinitely. To limit the number of iterations set the LoopCount property.
Public propertyLoopCount Gets or sets number of times the animation iterations. Zero (by default) means to loop indefinitely (if Loop is true).
Public propertyLoopIteration Loop iteration counter
Public propertyName Gets an optional name of the animation that can be set when the animation is created.
Public propertyProgress Gets the progress of the animation within one loop. The returns value is in range from 0 (start of the animation) to 1 (end of the animated loop).
Public propertyTime Gets the time of the current animation loop.
Public propertyTotalDuration Total duration of the animation including the loops that are defined by Loop and LoopCount. In case when the animation loops indefinitely (Loop = true; LoopCount = 0), then float.PositiveInfinity is returned.
Public propertyTotalProgress Gets the total progress of the animation including the loops that are defined by Loop and LoopCount. The returns value is in range from 0 (start of the animation) to 1 (end of the animated loop).
Public propertyTotalTime Gets the total time of the animation including the loops that are defined by Loop and LoopCount.
Top
Methods
 NameDescription
Protected methodAddKeyframesInfoText 
Protected methodAddTargetsInfoText 
Protected methodCheckIsRunning 
Protected methodStatic memberConstructAnimationTrackTProperty, TInfoProperty Helper for constructing final animation track from list of keyframe info entries and animation parameters.
Public methodDumpInfo 
Public methodGetAnimatedPropertyName 
Public methodGetDelay 
Public methodGetDuration 
Public methodGetEndDelay 
Public methodGetInfoText 
Protected methodGetTargetName 
Public methodInitialize Initialize the animation's internal structures and compute keyframe tracks. After this call, the animation's properties such as Duration and TotalDuration become valid. The animation itself (e.g., its parameters) cannot be altered anymore.
Protected methodOnCompleted 
Protected methodOnInitialize 
Protected methodOnLoopIterationChanged 
Protected methodOnRewind 
Protected methodOnStart 
Protected methodOnStop 
Protected methodOnUpdate 
Protected methodOnUpdated 
Protected methodRegisterAnimation Registers this animation on Scene or SceneView object so that Update method is automatically called. This method is called from Start method.
Public methodRewind 
Public methodSeek 
Public methodSetDelay(FuncT, Int32, Int32, Single) Sets the delay function that sets different delay for each target element. The function is called with the following parameters: targetElement, index of the target element, target elements count.
Public methodSetDelay(Single) Sets the delay before the animation starts.
Public methodSetDelay(TimeSpan) Sets the delay before the animation starts.
Public methodSetDuration(FuncT, Int32, Int32, Single) Sets the duration function that sets different duration for each target element. The function is called with the following parameters: targetElement, index of the target element, target elements count.
Public methodSetDuration(Single) Sets the duration of the whole animation.
Public methodSetDuration(TimeSpan) Sets the duration of the whole animation.
Public methodSetEasingFunctionToAllKeyframes 
Protected methodStatic memberSetEasingFunctionToKeyframeInfosTKeyframeInfo 
Public methodSetEndDelay(FuncT, Int32, Int32, Single) Sets the end delay function that sets different end delay for each target element. The function is called with the following parameters: targetElement, index of the target element, target elements count.
Public methodSetEndDelay(Single) Sets the end delay before the animation starts.
Public methodSetEndDelay(TimeSpan) Sets the end delay before the animation starts.
Public methodStart 
Public methodStop 
Protected methodStatic memberTemporallyScaleAnimationTracks Helper for temporal rescaling of per-target group of animation tracks.
Protected methodUnRegisterAnimation Removes this animation from Scene or SceneView object and prevents calling Update method automatically. This method is called from Stop method.
Public methodUpdate 
Public methodUpdate(Single) 
Top
Events
Fields
 NameDescription
Protected fieldanimationTracks Animation tracks. Populated by actual subclasses of this class.
Public fieldStatic memberDefaultDuration 
Protected fieldsettingsChanged Internal boolean indicating that animation's settings have changed and that animation needs to be re-initialized. If not done explicitly via Initialize method, animation is re-initialized implicitly on next Start, Rewind, or Seek(Single) method call.
Top
See Also