From 26a118cfbce29014864f6cdddae66cccb65ffb4f Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Sat, 7 Nov 2015 19:02:14 +0000 Subject: Remove transforms property of QTransform Compound transformations are now built up using QMatrix4x4 in both QML and C++. Updating examples accordingly. Change-Id: I03c9abf1f6cdd1b56226dc0e16a7ad5ce84516dd Reviewed-by: Paul Lemire --- examples/qt3d/controls/Logo.qml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'examples/qt3d/controls') diff --git a/examples/qt3d/controls/Logo.qml b/examples/qt3d/controls/Logo.qml index 1fe45340b..d4286ca7b 100644 --- a/examples/qt3d/controls/Logo.qml +++ b/examples/qt3d/controls/Logo.qml @@ -76,20 +76,15 @@ Entity { Transform { id: logoTransform - Rotate { - id: rotate_x - angle: rotation_x.value - axis: Qt.vector3d(1, 0, 0) - } - Rotate { - id: rotate_y - angle: rotation_y.value - axis: Qt.vector3d(0, 1, 0) - } - Rotate { - id: rotate_z - angle: rotation_z.value - axis: Qt.vector3d(0, 0, 1) + matrix: { + var m = Qt.matrix4x4(1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + m.rotate(rotation_z.value, Qt.vector3d(0, 0, 1)); + m.rotate(rotation_y.value, Qt.vector3d(0, 1, 0)); + m.rotate(rotation_x.value, Qt.vector3d(1, 0, 0)); + return m; } } -- cgit v1.2.3