Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0.3
-
None
-
-
3
-
7ea2fbddcf674d49ad7d219cdb8a4b760258360c (qt/qtbase/dev) 98fcf3cb611fe895e6998726ae39bdd30512c98b (qt/qtbase/6.0) 4a8aa7f62c0bdac5c3d745d7836fac357f2cb2ce (qt/qtbase/6.1) 0db1c949ecf6638b13d1d0c540365051e03b8e08 (qt/tqtc-qtbase/5.15)
Description
A node with rotation set to Qt.quaternion(0.707107,0.707107,0,0) will give an eulerRotation of QVector3D(nan, 0, 0).
The problem occurs with +/-0.707107 on X axis but not on Y or Z axis.
Any other value did not produce error
How to reproduce :
Model {
rotation: Qt.quaternion(0.707107,0.707107,0,0)
Component.onCompleted: {
console.log(rotation + "\t" + eulerRotation)
}
}
UPDATE :
The issue is not with QML but with QQuaternion class. We can test it with
QQuaternion q = QQuaternion(0.707107,-0.707107,0,0);
std::cout << q.toEulerAngles().x() << "\n";
Attachments
Issue Links
- is duplicated by
-
QTBUG-110156 QQuaternion::toEulerAngles() crash
- Closed
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-93600 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
348558,5 | QtGui/math3d : Fix QQuaternion::getEulerAngles | dev | qt/qtbase | Status: MERGED | +2 | 0 |
352163,2 | QtGui/math3d : Fix QQuaternion::getEulerAngles | 6.0 | qt/qtbase | Status: MERGED | +2 | 0 |
352164,2 | QtGui/math3d : Fix QQuaternion::getEulerAngles | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
352165,2 | QtGui/math3d : Fix QQuaternion::getEulerAngles | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |