'Difference' between two quaternions

前端 未结 2 1417
不知归路
不知归路 2020-12-15 05:41

I\'m working in Ogre, but it\'s a general quaternion problem.

I have an object, to which I apply a rotation quaternion Q1 initially. Later, I want to make it as if I

2条回答
  •  既然无缘
    2020-12-15 05:45

    It sounds like you want the inverse of Q1 times Q2. Transforming by the inverse of Q1 will rotate the object back to its original frame (the initial orientation, as you say), and then transforming by Q2 will rotate it to its new orientation.

    Note that the standard definition of a quaternion applies transformations in a right-to-left multiplication order, so you'll want to compute this as Q = Q2*Q1^{-1}.

提交回复
热议问题