While working on a recent project, ive' decided that i wanted to give the user freedom to rotate the object about its' axis and see what it looks like. Sounds fair enough right.. i mean its' a 3d object.. so let the user view it as he wants to.... so i started coding.. now i wanted the user to be able to rotate the object on Global X axis and the Global Y axis. So i have two different angles one about X and one about Y. How do i rotate them correctly so that i produce the right rotation? (in opengl) The problem here is once you rotate about an axis, the co-ordinate system is changed and you have to figure out how to rotate around the other axis. Here is the thing.. glRotatef() actually takes in an "angle" and "vector" about which the rotation should happen. I have convinently forgotten this information and struggled to find the answer... .some where in the forums some one mentioned .. its' an arbitrary vector you can rotate about.. wel.. that fixed m...
Some Random Stuff i work on.. apart from my job.