X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=skeleton.h;h=868e62431b174e0975190521b5308aef458d485d;hb=74b2136d5b41b18e2eec698f1fd11b503aa1100a;hp=a07a33af0e097de0f2c6d307f739be270422ba57;hpb=333430b27b5f9f73cbe9ad7921a4735aaff444f1;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/skeleton.h b/skeleton.h index a07a33a..868e624 100644 --- a/skeleton.h +++ b/skeleton.h @@ -78,7 +78,7 @@ static void keyframe_copy_pose( mdl_keyframe *kfa, mdl_keyframe *kfb, /* apply a rotation from the perspective of root */ static void keyframe_rotate_around( mdl_keyframe *kf, - v3f origin, v3f offset, v4f q ) + v3f origin, v3f offset, v4f q ) { v3f v0, co; v3_add( kf->co, offset, co ); @@ -212,6 +212,7 @@ static void skeleton_apply_pose( struct skeleton *skele, mdl_keyframe *pose, v3f *posemtx = final_mtx[i]; q_m3x3( kf->q, posemtx ); + m3x3_scale( posemtx, kf->s ); v3_copy( kf->co, posemtx[3] ); } return; @@ -239,6 +240,7 @@ static void skeleton_apply_pose( struct skeleton *skele, mdl_keyframe *pose, /* pose matrix */ mdl_keyframe *kf = &pose[i-1]; q_m3x3( kf->q, posemtx ); + m3x3_scale( posemtx, kf->s ); v3_copy( kf->co, posemtx[3] ); v3_add( temp_delta, posemtx[3], posemtx[3] );