#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;
#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
{
#region Fields
IDictionary animationClipsValue;
IList bindPoseValue;
IList inverseBindPoseValue;
IList skeletonHierarchyValue;
#endregion
///
/// Constructs a new skinning data object.
///
public SkinningData(IDictionary animationClips,
IList bindPose, IList inverseBindPose,
IList skeletonHierarchy)
{
animationClipsValue = animationClips;
bindPoseValue = bindPose;
inverseBindPoseValue = inverseBindPose;
skeletonHierarchyValue = skeletonHierarchy;
}
///
/// 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.
///
public IDictionary AnimationClips
{
get { return animationClipsValue; }
}
///
/// Bindpose matrices for each bone in the skeleton,
/// relative to the parent bone.
///
public IList BindPose
{
get { return bindPoseValue; }
}
///
/// Vertex to bonespace transforms for each bone in the skeleton.
///
public IList InverseBindPose
{
get { return inverseBindPoseValue; }
}
///
/// For each bone in the skeleton, stores the index of the parent bone.
///
public IList SkeletonHierarchy
{
get { return skeletonHierarchyValue; }
}
}
}