FIX: gcc's complaints about OgreImporter.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@486 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2009-09-29 10:39:17 +00:00
parent 449bff99be
commit 35b7416437
1 changed files with 5 additions and 4 deletions

View File

@ -874,17 +874,18 @@ aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector<Bone> &
void Bone::CalculateWorldToBoneSpaceMatrix(vector<Bone> &Bones) void Bone::CalculateWorldToBoneSpaceMatrix(vector<Bone> &Bones)
{ {
//Calculate the matrix for this bone: //Calculate the matrix for this bone:
aiMatrix4x4 t0,t1;
if(-1==ParentId) if(-1==ParentId)
{ {
WorldToBoneSpace= aiMatrix4x4::Translation(Position, aiMatrix4x4()) WorldToBoneSpace= aiMatrix4x4::Translation(Position, t0)
* aiMatrix4x4::Rotation(RotationAngle, RotationAxis, aiMatrix4x4()) * aiMatrix4x4::Rotation(RotationAngle, RotationAxis, t1)
; ;
} }
else else
{ {
WorldToBoneSpace= Bones[ParentId].WorldToBoneSpace WorldToBoneSpace= Bones[ParentId].WorldToBoneSpace
* aiMatrix4x4::Translation(Position, aiMatrix4x4()) * aiMatrix4x4::Translation(Position, t0)
* aiMatrix4x4::Rotation(RotationAngle, RotationAxis, aiMatrix4x4()) * aiMatrix4x4::Rotation(RotationAngle, RotationAxis, t1)
; ;
} }