コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="frame"></param>
        /// <param name="skeleton"></param>
        public void UpdateSkeleton(float frame, GenericSkeleton skeleton)
        {
            foreach (var v in TransformNodes)
            {
                GenericBone bone = null;
                switch (v.HashType)
                {
                case AnimNodeHashType.Name:
                    bone = skeleton.Bones.Find(e => e.Name == v.Name);
                    break;

                case AnimNodeHashType.CRC32C:
                    bone = skeleton.Bones.Find(e => e.NameHash == v.Hash);
                    break;
                }
                if (bone != null)
                {
                    bone.AnimatedTransform = v.GetTransformAt(frame, bone);
                }
            }
        }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="Frame"></param>
 /// <param name="skeleton"></param>
 /// <returns></returns>
 public Matrix4 GetTransformAt(float Frame, GenericSkeleton skeleton)
 {
     return(GetTransformAt(Frame, skeleton.GetBoneByName(Name)));
 }