I'm experimenting with using axis-angle vectors for rotations in my hobby game engine. This is a 3-component vector along the axis of rotation with a length of the rotation in radians. I like them because:
- Unlike quats or rotation matrices, I can actually see the numbers and visualize the rotation in my mind
- They're a little less memory than quaternions or matrices.
- I can represent values outside the range of -Pi to Pi (This is important if I store an angular velocity)
However, I have a tight loop that updates the rotation of all of my objects (tens of thousands) based on their angular velocity. Currently, the only way I know to combine two rotation axis vectors is to convert them to quaternions, multiply them, and then convert the result back to an axis/angle. Through profiling, I've identified this as a bottleneck. Does anyone know a more straightforward approach?
[phi,psi,theta]
may representRX(phi)*RY(psi)*RZ(theta)
. If that is the case you need to find a way to construct the 3x3 rotation matrix, and pull the axis-angle from it. – Oyster