I have a cube on screen that I can rotate using the standard: glRotatef(...). The rotation is done ok as long as it is aligned to the Global/Initial/Default XYZ axis of (1,0,0) , (0,1,0) and (0,0,1). What I am trying to do is rotate the cube along its OWN axis which obviously changes as the cube changes. How is that achieved ?
assume there is no translation. I can obtain the XYZ axis of the cube at any time and I can rotate along the local X axis for a while before the cube starts spinning in all directions. I am assuming this is due to axis no longer being 90 degrees to each other.