/// <summary> /// Constructor for the animation player. It makes the /// association between a clip and a model and sets up for playing /// </summary> /// <param name="clip"></param> public AnimationPlayer(AnimationClip clip, AnimatedModel model) { this.clip = clip; this.model = model; // Create the bone information classes boneCnt = clip.Bones.Count; boneInfos = new BoneInfo[boneCnt]; for (int b = 0; b < boneInfos.Length; b++) { // Create it boneInfos[b] = new BoneInfo(clip.Bones[b]); // Assign it to a model bone boneInfos[b].SetModel(model); } Rewind(); }
/// <summary> /// Assign this bone to the correct bone in the model /// </summary> /// <param name="model"></param> public void SetModel(AnimatedModel model) { // Find this bone assignedBone = model.FindBone(ClipBone.Name); }