i am working on a modeling app with a rotation manipulation tool.
i am trying to get the manipulation tool to rotate in the transformed object space.
http://contrarymotion.com/screen.gif
that is an example of selecting the transformed x axis of the object, but in most cases i cannot get the actual rotation to happen on the selected axis only while retaining the rotation of the non selected axes. ( rotate the object in place on the orientation of the selected axis )
i can use a custom matrix, quaternions, whatever, i just cannot seem to figure out the right one or combination of them. i can easily get it to work on one axis at a time, but then the other two do not work properly. i know it is because the axes are getting transformed themselves, i guess i cannot figure out how to transform the appropriate values for them.
any help or pointers would be greatly appreciated. i would like to keep a consistent rotation transform that consists of three angles for each axis. but, when a certain axis is selected i would like to rotate around that axis only in object space and have the 3 transform angles update appropriately.
something similar to what maya does. it appears that they do their rotation transform with something like…
glRotated( angle, 0.0, 0.0, 1.0 );
glRotated( angle, 0.0, 1.0, 0.0 );
glRotated( angle, 1.0, 0.0, 0.0 );
… or something similar using a matrix that is most likely the combination of these.
when u rotate on x only the x value of the rotation transform changes, because it is the last matrix multiplied. but when u rotate on y or z, the rotation happens on the local axis only, but in many cases all three angles of the transform change.
this is exactly what i am trying to accomplish. however, i cannot calculate the values of these angles properly.
thanks