[Interest] Add extra rotation to a quaternion

Rainer Wiesenfarth rainer_wiesenfarth at trimble.com
Mon Apr 6 07:11:48 CEST 2020


On Sun, Apr 5, 2020 at 11:04 AM Megidd Git <megiddgit at gmail.com> wrote:

> Hi!
> I have a QQuaternion <https://doc.qt.io/qt-5/qquaternion.html> like:
> QQuaternion(scalar:0.707107, vector:(0, 0, 0.707107))
> I want to add this extra rotation to my quaternion:
> Rotation around point QVector3D(34.5, -40, 7.16294) in XY plane by 180°
> [...]
>

Just for clarification: A quaternion does *not* describe a "rotation around
point", but just a rotation in 3D.

If you want to rotate around a given point, you first have to apply a
translation to the origin, then the rotation (which might be given as a
quaternion) and then a translation back to the intended rotational centre.

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200406/a613b02b/attachment.html>


More information about the Interest mailing list