In my OpenGL application I need to use ArcBall rotation to rotate objects using mouse.
I relized that I have to go with Quaternions after reading this article - http://www.gamedev.net/page/resources/_/technical/math-and-physics/quaternion-powers-r1095
And I found an easy to use implementation at here - http://www.codeproject.com/KB/openGL/virtualtrackball.aspx
But my problem is I also need to animate my object between saved two status. That is -
State(1)= (Postition X1,Position Y1,Position Z1, Rotation 1);
State(2)= (Postition X2,Position Y2,Position Z2, Rotation 2);
*These 'Rotations' are rotation matrices
And the animation is done in n steps.
Something like shown in this video - http://www.youtube.com/watch?v=rrUCBOlJdt4
If I was using 3 seperate angles for three axises(roll, pitch, yaw) I could easily interpolate the angles. But ,since ArcBall uses rotation Matrix , how can I interpolate the rotations between State 1 and State2 ?
Any suggestions ?