Calculate Rotation Matrix
I have two rotation matrices, r1 and r2.
r1 is created from three given base vectors a, b, c.
r2 is created by rotating about given yaw, pitch, roll angles. Yaw about Y-axis, Pitch about X-axis, roll about Z-axis.
I now want to know how what transformation matrix I need to get from r1 to r2.
Also, I'd like to know what specific yaw, pitch, roll angles I need to get from r1 to r2.
At first I thought it would simply be
r3 = r1 * r2^-1
But I don't think that is correct.
Here's an example:
r1 = createRotationMatrix(45, 45, 45); //(yaw, pitch, roll)
r2 = createRotationMatrix(60, 60, 60);
r3 = createRotationMatrix(15, 15, 15);
Basically, what I'm trying to do is to calculate r3 from r1 and r2.
Is that even possible with matrix multiplications, or do I have to calculate the Euler Angles inside r1 and r2 and then create a new matrix r3 using these?
Thanks in advance,