using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Toolbox.Library.Forms; namespace Toolbox.Library.Animations { public enum STInterpoaltionType { Constant, Step, Linear, Hermite, Bezier, Bitmap, } /// /// Represents how a track is played after it reaches end frame. /// Repeat repeats back from the start. /// Mirror goes from the end frame to the start /// public enum STLoopMode { Repeat, Mirror, Clamp, } /// /// Represents a class for animating /// public class STAnimation { /// /// The name of the animation. /// public string Name { get; set; } /// /// The frame to start playing the animation. /// public float StartFrame { get; set; } /// /// The current frame of the animation. /// public float Frame { get; set; } /// /// The total amount of frames to play in the animation. /// public float FrameCount { get; set; } /// /// Whether the animation will loop or not after /// the playback rearches the total frame count. /// public bool Loop { get; set; } /// /// The step value when a frame advances. /// public float Step { get; set; } /// /// A list of groups that store the animation data. /// public List AnimGroups = new List(); public void SetFrame(float frame) { Frame = frame; } public virtual void NextFrame() { if (Frame < StartFrame || Frame > FrameCount) return; } /// /// Resets the animation group values /// This should clear values from tracks, or reset them to base values. /// public virtual void Reset() { } } }