diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-11-07 19:02:14 +0000 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-11-17 19:41:18 +0000 |
commit | 26a118cfbce29014864f6cdddae66cccb65ffb4f (patch) | |
tree | daea9f2fc41c1df586c35cd56daa61f920ce5b58 /examples/qt3d/custom-mesh-qml | |
parent | ace675a084ab944a245500b9f54be653126c3147 (diff) |
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 <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/custom-mesh-qml')
-rw-r--r-- | examples/qt3d/custom-mesh-qml/main.qml | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/examples/qt3d/custom-mesh-qml/main.qml b/examples/qt3d/custom-mesh-qml/main.qml index 34d14aa5f..05b45f793 100644 --- a/examples/qt3d/custom-mesh-qml/main.qml +++ b/examples/qt3d/custom-mesh-qml/main.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ +import QtQuick 2.2 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 -import QtQuick 2.2 as QQ2 Entity { id: sceneRoot @@ -207,16 +207,21 @@ Entity { Transform { id: meshTransform - Scale { scale: 10 } - Rotate { - id: meshRotation - axis: Qt.vector3d(0, 1, 0) + property real userAngle: 0.0 + matrix: { + var m = Qt.matrix4x4(1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + m.rotate(userAngle, Qt.vector3d(0, 1, 0)); + m.scale(10); + return m; } } QQ2.NumberAnimation { - target: meshRotation - property: "angle" + target: meshTransform + property: "userAngle" duration: 10000 from: 0 to: 360 |