No, you're pretty much doing it the best way possible. I don't think there is a built-in DirectX function that does what you want. For step 4, you can use D3DXMatrixRotationAxis()
. Just be careful about the edge cases, such as when |A| or |B| is zero, or when the angle is 0° or 180°.
Adam Rosenfield
2008-11-13 05:04:49