BREAKING CHANGE: aiQuaternion + / aiQuaternion to aiMatrix conversion does now conform to the 'usual' quaternion conventions. See the discussion at https://sourceforge.net/projects/assimp/forums/forum/817653/topic/3442128 for all the details.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@502 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2009-11-19 23:22:53 +00:00
parent 89475c7e42
commit 35cfb90e6f
7 changed files with 44 additions and 20 deletions

View File

@@ -246,6 +246,9 @@ void MD5Importer::AttachChilds_Mesh(int iParentID,aiNode* piParent, BoneList& bo
aiQuaternion quat;
MD5::ConvertQuaternion ( bones[i].mRotationQuat, quat );
// FIX to get to Assimp's quaternion conventions
quat.w *= -1.f;
bones[i].mTransform = aiMatrix4x4 ( quat.GetMatrix());
bones[i].mTransform.a4 = bones[i].mPositionXYZ.x;
bones[i].mTransform.b4 = bones[i].mPositionXYZ.y;
@@ -612,6 +615,9 @@ void MD5Importer::LoadMD5AnimFile ()
MD5::ConvertQuaternion(vTemp, qKey->mValue);
qKey->mTime = vKey->mTime = dTime;
// we need this to get to Assimp quaternion conventions
qKey->mValue.w *= -1.f;
}
}