Guest User

Untitled

a guest
May 20th, 2018
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1.         internal void FinishAnimation(Matrix worldMatrix)
  2.         {
  3.             //-----------------------------------------------
  4.             int lenght = worldTransforms.Length;
  5.  
  6.             //bonetransform is keyframe nature from the fbx
  7.             worldTransforms[0] = boneTransforms[0] * currentAnimation.inverseBindPose[0]
  8.                 * skinData.BindPose[0] * worldMatrix;
  9.             for (int i = 1; i < lenght; i++)
  10.             {
  11.                 int parent = skinData.SkeletonHierarchy[i];
  12.                 worldTransforms[i] = boneTransforms[i]
  13.                     * currentAnimation.inverseBindPose[i] * skinData.BindPose[i]
  14.                     * worldTransforms[parent];
  15.             }
  16.  
  17.             for (int i = 0; i < lenght; i++)
  18.             {
  19.                 skinTransforms[i] = skinData.InverseBindPose[i] * worldTransforms[i];
  20.             }
  21.         }
Add Comment
Please, Sign In to add comment