I have a question regarding quaternions and rotations.
Let the quaternion q(w, x, y, z) represent the orientation of a camera in world space. I use a UVN camera system where u = right vector, v = up vector and n = forward vector. With zero rotation the camera aligns with the world basis vectors (x, y, z) like so:
u aligns with +x
v aligns with +z
n aligns with +y
My question is how do I construct a quaternion that rotates objects from the RH coordinate system of the world space to a LH coordinate system with the following alignments:
u aligns with +x
v aligns with +y
n aligns with +z
Previously I've use the matrix
[ ux vx nx ]
[ uy vy ny ]
[ uz vz nz ]
however want to switch to a completely quaternion based system.
I suspect I'll need q-1. This rotates objects into camera space, preserving handedness. To switch alignments I suspect I'll need to swap terms in the quaternion.
Thanks.