[Solved] Rotation Order Maya to openGL

Hey all, so I’ve finally sorted out all the issues, crosses fingers, in my 3D skeletal animation importer/renderer and I’m left with one question.

Why is it that when you export a skeleton to .fbx with all your rotations in XYZ order you have to tell openGL to rotate in the reverse order ZYX?

To clarify: I currently am updating my martix by calling these functions


		gl.glTranslatef(translate.m_x, translate.m_y, translate.m_z);
		gl.glScalef(scale.m_x, scale.m_y, scale.m_z);
		gl.glRotatef(rotation.m_x, 1.0f, 0.0f, 0.0f);
		gl.glRotatef(rotation.m_y, 0.0f, 1.0f, 0.0f);
		gl.glRotatef(rotation.m_z, 0.0f, 0.0f, 1.0f);

Which works fine for moving the camera/objects, but for the joints if I want them to rotate properly I have to have the rotate functions reversed, like so.


		gl.glTranslatef(translate.m_x, translate.m_y, translate.m_z);
		gl.glScalef(scale.m_x, scale.m_y, scale.m_z);
		gl.glRotatef(rotation.m_z, 0.0f, 0.0f, 1.0f);
		gl.glRotatef(rotation.m_y, 0.0f, 1.0f, 0.0f);
		gl.glRotatef(rotation.m_x, 1.0f, 0.0f, 0.0f);

OK I figured this out, I’ll refrain from posting more topics until I get stuck for more than 24 hours.

Anyway for people going down this path in the future:

http://inside.mines.edu/fs_home/gmurray/ArbitraryAxisRotation/