AvatarKeyframe.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // AvatarKeyframe.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using System;
  11. using Microsoft.Xna.Framework;
  12. using Microsoft.Xna.Framework.Content;
  13. #endregion
  14. namespace CustomAvatarAnimation
  15. {
  16. /// <summary>
  17. /// Describes the position of a single bone at a single point in time.
  18. /// </summary>
  19. public struct AvatarKeyFrame
  20. {
  21. /// <summary>
  22. /// The index of the target bone that is animated by this keyframe.
  23. /// </summary>
  24. public int Bone;
  25. /// <summary>
  26. /// The time offset from the start of the animation to this keyframe.
  27. /// </summary>
  28. public TimeSpan Time;
  29. /// <summary>
  30. /// The bone transform for this keyframe.
  31. /// </summary>
  32. public Matrix Transform;
  33. #region Initialization
  34. /// <summary>
  35. /// Constructs a new AvatarKeyFrame object.
  36. /// </summary>
  37. public AvatarKeyFrame(int bone, TimeSpan time, Matrix transform)
  38. {
  39. Bone = bone;
  40. Time = time;
  41. Transform = transform;
  42. }
  43. #endregion
  44. }
  45. }