#region File Description
//-----------------------------------------------------------------------------
// Keyframe.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion
#region Using Statements
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
#endregion
namespace SkinnedModel
{
///
/// Describes the position of a single bone at a single point in time.
///
public class Keyframe
{
///
/// Constructs a new keyframe object.
///
public Keyframe(int bone, TimeSpan time, Matrix transform)
{
Bone = bone;
Time = time;
Transform = transform;
}
///
/// Private constructor for use by the XNB deserializer.
///
private Keyframe()
{
}
///
/// Gets the index of the target bone that is animated by this keyframe.
///
[ContentSerializer]
public int Bone { get; private set; }
///
/// Gets the time offset from the start of the animation to this keyframe.
///
[ContentSerializer]
public TimeSpan Time { get; private set; }
///
/// Gets the bone transform for this keyframe.
///
[ContentSerializer]
public Matrix Transform { get; private set; }
}
}