summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/transforms-qml
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-11-11 16:35:30 +0000
committerSean Harmer <sean.harmer@kdab.com>2015-11-20 18:28:13 +0000
commit8f6462aa1f0f29c8f39d25214c4ccf802824f2d5 (patch)
tree87810d10c3882480a402be1130a29a66e87a6e06 /examples/qt3d/transforms-qml
parenta081396ccea6903ee9bd9c07a3c0694f92f91e1f (diff)
Adapt examples to use new quaternion helpers
Change-Id: If9100fbc1870c09d90c9c1df102cf9c0503b96cb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/transforms-qml')
-rw-r--r--examples/qt3d/transforms-qml/TrefoilKnot.qml12
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/qt3d/transforms-qml/TrefoilKnot.qml b/examples/qt3d/transforms-qml/TrefoilKnot.qml
index 10028ded0..a53a45dd6 100644
--- a/examples/qt3d/transforms-qml/TrefoilKnot.qml
+++ b/examples/qt3d/transforms-qml/TrefoilKnot.qml
@@ -50,15 +50,9 @@ Entity {
Transform {
id: transform
-
- matrix: {
- var m = Qt.matrix4x4();
- m.translate( root.translation );
- m.rotate( root.theta, Qt.vector3d( 1.0, 0.0, 0.0 ) );
- m.rotate( root.phi, Qt.vector3d( 0.0, 1.0, 0.0 ) );
- m.scale( root.scale );
- return m;
- }
+ translation: root.translation
+ rotation: fromEulerAngles(theta, phi, 0)
+ scale: root.scale
}
Mesh {