I am trying implement arcball/trackball rotation but I have a problem with the center of rotation. I want the center to be the center of my screen no matter what.
Let me explain what I have done so far.
I've created a quaterion (rotation axis: vector_start x vector_end, angle: vector_start * vector_end)
From that quaternion I've created a rotation matrix in order to use it with glMultMatrixf(matrix) and get the desired rotation.
The problem is that while my model seems to arcball rotate as it should it always rotates around its local origin. How could I make it rotate around the center of my screen no matter where its local origin is located?
I suppose a solution to that problem could be to translate the whole rotation axis in the center of the screen and then apply the rotation but is this possible? Do I miss something here? Please help.