aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/glue/qtgui.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-12-18 17:29:11 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-12-21 10:54:38 +0100
commita4e4253a72a1ab600af8ed2b3b6306742ebab6ba (patch)
treedc9b6105bd121154673fdf001132ba1f4f1d6e31 /sources/pyside6/PySide6/glue/qtgui.cpp
parentb55e221464c18053fa44f18132071ebdaee8f432 (diff)
Add QQuaternion getAxisAndAngle()/getEulerAngles()
Address a fixme-comment in the typesystem file. Change-Id: I9242a04cab75229480efa81a98dc0bbef9bb4e61 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/glue/qtgui.cpp')
-rw-r--r--sources/pyside6/PySide6/glue/qtgui.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp
index e38684a7f..d7c74018a 100644
--- a/sources/pyside6/PySide6/glue/qtgui.cpp
+++ b/sources/pyside6/PySide6/glue/qtgui.cpp
@@ -854,6 +854,24 @@ else
%PYARG_0 = %CONVERTTOPYTHON[int](cppResult);
// @snippet qdrag-exec-arg2
+// @snippet qquaternion-getaxisandangle-vector3d-float
+QVector3D outVec{};
+float angle{};
+%CPPSELF.%FUNCTION_NAME(&outVec, &angle);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QVector3D](outVec));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[float](angle));
+// @snippet qquaternion-getaxisandangle-vector3d-float
+
+// @snippet qquaternion-geteulerangles
+float pitch{}, yaw{}, roll{};
+%CPPSELF.%FUNCTION_NAME(&pitch, &yaw, &roll);
+%PYARG_0 = PyTuple_New(3);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[float](pitch));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[float](yaw));
+PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[float](roll));
+// @snippet qquaternion-geteulerangles
+
// @snippet qregion-len
return %CPPSELF.rectCount();
// @snippet qregion-len