From eb9a278c3ee1552072e5d84f6bb83252994ba70e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 31 Aug 2006 06:50:33 +0000 Subject: [PATCH] simplify --- stepmania/src/Model.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index cd06511aea..67f7da7f19 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -628,9 +628,6 @@ void Model::SetBones( const msAnimation* pAnimation, float fFrame, vectorfTime - pLastPositionKey->fTime; @@ -659,8 +658,6 @@ void Model::SetBones( const msAnimation* pAnimation, float fFrame, vectorfTime, pThisRotationKey->fTime, 0, 1 ); - - RageVector4 q; - RageQuatSlerp( &q, pLastRotationKey->Rotation, pThisRotationKey->Rotation, s ); - - RageMatrixFromQuat( &m, q ); + RageQuatSlerp( &vRot, pLastRotationKey->Rotation, pThisRotationKey->Rotation, s ); } else if( pLastRotationKey == 0 ) { - RageMatrixFromQuat( &m, pThisRotationKey->Rotation ); + vRot = pThisRotationKey->Rotation; } else if( pThisRotationKey == 0 ) { - RageMatrixFromQuat( &m, pLastRotationKey->Rotation ); + vRot = pLastRotationKey->Rotation; } + + RageMatrix m; + RageMatrixIdentity( &m ); + RageMatrixFromQuat( &m, vRot ); m.m[3][0] = vPos[0]; m.m[3][1] = vPos[1]; m.m[3][2] = vPos[2];