/// <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 Dictionary <string, BoneInfo>(); for (int b = 0; b < boneCnt; b++) { // Create it boneInfos[clip.Bones[b].Name] = new BoneInfo(clip.Bones[b]); // Assign it to a model bone boneInfos[clip.Bones[b].Name].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); }