I have a rotation matrix where right is +x, up is +y, and forward is -z. This is the standard OpenGL principal axes.
I need to express this rotation matrix in a new coordinate system where down is +y and forward is +z. So, the new system has axes for y and z flipped.
My current strategy was to use this formula.
rotation a = get_rotation();
rotation b = rotation(
1, 0, 0,
0, -1, 0,
0, 0, -1
);
a = b * a * transpose(b);
Though this seems to yield incorrect results.
What would be the proper way to transform a rotation matrix from one reference frame to another?