I'm doing a software for mental rotations training. It shows you some 3d object, then prompts you to rotate it in your mind along each axis (three numbers are shown). Then it shows you 3 possibilities of the result, and you should choose the correct one.
My frustrating problem is, that "rotateX" functions rotates objects "around their relative position to the origin". Which means, that when I rotate object around one axis, the directions of other two changes! So the following rotation, say around Y, is not done along the original Y axis, but some new vector. I need to be able to rotate it absolutely, with reference to absolute coordinate system (like when you are standing in a room, and object is in corner, and then rotates along each corners' axis, one after another, always from your, stable, point of view).
Is it possible to implement this request in processing (maybe even counterintuitively, through some camera-view implementaion)? I definitely hope for that, and thank you for any comments.
----
EDIT 1: After some theoretical and practical research :), I think I can rephrase my question:
How can I do rotation in all three directions at once?
Something like rotate(x_degrees, y_degrees, z_degrees) ?