Original Post
I have a (unit) forward vector and a (unit) up vector (known to be orthogonal to one another). How do I get the quaternion that rotates to such an orientation? In other words: there is some quaternion that would transform (0,1,0) into the up vector and (0,0,1) into the forward vector. How do I calculate what that quaternion is? I'm actually implementing this in C#/XNA so have all the .NET and XMA framework functions available (none of them appear to provide this automatically), but I can easily translate from other languages or straight mathematics if required. Quaternions confuse the heck out of me. :-)