The usual way of doing rotations around and arbitary point is this:
glTranslate( “Move model so center is at roration point”);
glRotate( “Do reqired rotation” );
glTranslate( " Move back to origional position");
Of course OpenGL has reverse order matrices so you have to do the above in the reverse order. ( ie negative translation, rotation, positive translation)
Things are also much easier if your model is made with it’s center already at the required position. (ie. no need to translate)
The plane (to keep the same example) will not rotate correctly 'cause these rotations are based on world axises and not on the plane axises.
To be correct it seems to me that the rotations have to be based on the plane axises and follow each previous rotation.
Thus the idea I would like to verify (and optimize) is to rotate the plane Y and Z axises when doing the first rotation around X and then to use these transformed axis to do the second and then the third rotation.
(note: Z axis being transformed once more after the rotation around the transformed Y axis).
Another way to say it would be:
Rotate the plane around X axis
Rotate Y and Z around X, resulting axises are Y’ and Z’