Another fix related to LightWave ZXY rotation order and Heading, Pitch, Bank convention.

pull/3/head
Gellule Xg 2011-12-06 22:43:02 -10:00
parent 0a317b944e
commit 855e4bc480
1 changed files with 5 additions and 6 deletions

View File

@ -243,14 +243,13 @@ void AnimResolver::ExtractBindPose(aiMatrix4x4& out)
if (scale_z) scaling.z = scale_z->keys[0].value;
// build the final matrix
aiMatrix4x4 s,r,t;
r.FromEulerAnglesXYZ(angles);
//aiMatrix4x4::RotationY(angles.y,r);
// fixme: make FromEulerAngles static, too
aiMatrix4x4 s,rx,ry,rz,t;
aiMatrix4x4::RotationZ(angles.z, rz);
aiMatrix4x4::RotationX(angles.y, rx);
aiMatrix4x4::RotationY(angles.x, ry);
aiMatrix4x4::Translation(translation,t);
aiMatrix4x4::Scaling(scaling,s);
out = s*r*t;
out = t*ry*rx*rz*s;
}
// ------------------------------------------------------------------------------------------------