IMotionScheduler.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. namespace LitMotion
  2. {
  3. /// <summary>
  4. /// Provides the function to schedule the execution of a motion.
  5. /// </summary>
  6. public interface IMotionScheduler
  7. {
  8. /// <summary>
  9. /// Schedule the motion.
  10. /// </summary>
  11. /// <typeparam name="TValue">The type of value to animate</typeparam>
  12. /// <typeparam name="TOptions">The type of special parameters given to the motion data</typeparam>
  13. /// <typeparam name="TAdapter">The type of adapter that support value animation</typeparam>
  14. /// <param name="data">Motion data</param>
  15. /// <param name="callbackData">Motion callback data</param>
  16. /// <returns>Motion handle</returns>
  17. MotionHandle Schedule<TValue, TOptions, TAdapter>(ref MotionData<TValue, TOptions> data, ref MotionCallbackData callbackData)
  18. where TValue : unmanaged
  19. where TOptions : unmanaged, IMotionOptions
  20. where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>;
  21. /// <summary>
  22. /// Returns the current time.
  23. /// </summary>
  24. double Time { get; }
  25. }
  26. /// <summary>
  27. /// Type of time used to play the motion
  28. /// </summary>
  29. public enum MotionTimeKind : byte
  30. {
  31. Time = 0,
  32. UnscaledTime = 1,
  33. Realtime = 2
  34. }
  35. }