#region File Description
//-----------------------------------------------------------------------------
// SkinningData.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion
#region Using Statements
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
#endregion
namespace SkinnedModel
{
///
/// Combines all the data needed to render and animate a skinned object.
/// This is typically stored in the Tag property of the Model being animated.
///
public class SkinningData
{
///
/// Constructs a new skinning data object.
///
public SkinningData(Dictionary animationClips,
List bindPose, List inverseBindPose,
List skeletonHierarchy)
{
AnimationClips = animationClips;
BindPose = bindPose;
InverseBindPose = inverseBindPose;
SkeletonHierarchy = skeletonHierarchy;
}
///
/// Private constructor for use by the XNB deserializer.
///
private SkinningData()
{
}
///
/// Gets a collection of animation clips. These are stored by name in a
/// dictionary, so there could for instance be clips for "Walk", "Run",
/// "JumpReallyHigh", etc.
///
[ContentSerializer]
public Dictionary AnimationClips { get; private set; }
///
/// Bindpose matrices for each bone in the skeleton,
/// relative to the parent bone.
///
[ContentSerializer]
public List BindPose { get; private set; }
///
/// Vertex to bonespace transforms for each bone in the skeleton.
///
[ContentSerializer]
public List InverseBindPose { get; private set; }
///
/// For each bone in the skeleton, stores the index of the parent bone.
///
[ContentSerializer]
public List SkeletonHierarchy { get; private set; }
}
}