get pitch, yaw, roll from a CMRotationMatrix

后端 未结 3 1027
Happy的楠姐
Happy的楠姐 2021-01-31 23:18

I have a CMRotationMatrix *rot and i would like to get the pitch, yaw, roll from the matrix. Any ideas how i could do that?

Thanks

3条回答
  •  走了就别回头了
    2021-01-31 23:48

    pitch, yaw, roll from the matrix. Any ideas how i could do that?

    In which order? Pitch, yaw and roll, commonly called Euler angles, don't represent rotations unambigously. Depending on the order you carry out the individual sub-rotations you end up with completely different rotation matrices.

    My personal recommendation: Don't use Euler angles at all, they just call for (numerical) trouble. Use a matrix (you already do) or a quaternion.

提交回复
热议问题