[Interest] Add extra rotation to a quaternion

Marian Beermann public at enkore.de
Sun Apr 5 15:35:20 CEST 2020


Hi,

convert your rotation to a quaternion and multiply both quaternions to
get a quaternion representing both rotations. Note that quaternion
multiplication is not commutative.

See these links for some handy explanations and shortcuts
https://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm
https://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm

-Marian

Am 05.04.20 um 11:02 schrieb Megidd Git:
> 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°
> 
> I don't know how to convert my extra rotation to quaternion and add it
> to my previous quaternion. Can anybody help?
> 
> Thanks!
> 
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
> 



More information about the Interest mailing list