I have an arcball camera with a rotation defined by two angles (phi/theta, polar/azimuthal) that is controlled with mouse movement.
I convert these two angles (as euler angles) to a quaternion like this:
glm::quat rotation = glm::quat(glm::vec3(phi, theta, 0));
At some point I need to convert a quaternion back to two angles, but I think there is an infinite number of solutions. Is there a way to get back the two angles without any roll?
Or is there a better solution to make an arcball/orbit camera without using euler angles and keeping only the quaternion rotation of the camera?