Exemplo n.º 1
0
 /// <summary>
 /// Assign this bone to the correct bone in the model
 /// </summary>
 /// <param name="model"></param>
 public void SetModel(SkinnedRModelInstance model)
 {
     // Find this bone
     assignedBone = model.FindBone(ClipBone.Name);
 }
Exemplo n.º 2
0
        /// <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, SkinnedRModelInstance modelInstance)
        {
            this.clip = clip;
            this.model = modelInstance;

            // 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();
        }