123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #region File Description
- //-----------------------------------------------------------------------------
- // AnimationClip.cs
- //
- // Microsoft XNA Community Game Platform
- // Copyright (C) Microsoft Corporation. All rights reserved.
- //-----------------------------------------------------------------------------
- #endregion
- #region Using Statements
- using System;
- using System.Collections.Generic;
- using Microsoft.Xna.Framework.Content;
- #endregion
- namespace SkinnedModel
- {
- /// <summary>
- /// An animation clip is the runtime equivalent of the
- /// Microsoft.Xna.Framework.Content.Pipeline.Graphics.AnimationContent type.
- /// It holds all the keyframes needed to describe a single animation.
- /// </summary>
- public class AnimationClip
- {
- /// <summary>
- /// Constructs a new animation clip object.
- /// </summary>
- public AnimationClip(TimeSpan duration, List<Keyframe> keyframes)
- {
- Duration = duration;
- Keyframes = keyframes;
- }
- /// <summary>
- /// Private constructor for use by the XNB deserializer.
- /// </summary>
- private AnimationClip()
- {
- }
- /// <summary>
- /// Gets the total length of the animation.
- /// </summary>
- [ContentSerializer]
- public TimeSpan Duration { get; private set; }
- /// <summary>
- /// Gets a combined list containing all the keyframes for all bones,
- /// sorted by time.
- /// </summary>
- [ContentSerializer]
- public List<Keyframe> Keyframes { get; private set; }
- }
- }
|