#region File Description //----------------------------------------------------------------------------- // RootAnimationPlayer.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; #endregion namespace CustomModelAnimation { /// /// The animation player contains a single transformation that is used to move/position/scale /// something. /// public class RootAnimationPlayer : ModelAnimationPlayerBase { Matrix currentTransform; /// /// Initializes the transformation to the identity /// protected override void InitClip() { this.currentTransform = Matrix.Identity; } /// /// Sets the key frame by storing the current transform /// /// protected override void SetKeyframe(ModelKeyframe keyframe) { this.currentTransform = keyframe.Transform; } /// /// Gets the current transformation being applied /// /// Transformation matrix public Matrix GetCurrentTransform() { return this.currentTransform; } } }