summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/clip-planes-qml
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-11-11 12:18:26 +0000
committerPaul Lemire <paul.lemire@kdab.com>2015-11-20 16:34:26 +0000
commitcf52d92133a356784e0f784e810b232290d8d3da (patch)
treef89d68477f59d8a38970402119ccfe8b2b8082e5 /examples/qt3d/clip-planes-qml
parentba3e89e4b609d19b0607d2cb1cdf13b83f6cd984 (diff)
Adapt examples to use rotation property and quaternion helper
This covers all examples that can use the standard S, R, T order of transformations with a single rotation. Change-Id: Ief6741f9605742c545d8ef2be9bf8ab65164835d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/clip-planes-qml')
-rw-r--r--examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml11
1 files changed, 2 insertions, 9 deletions
diff --git a/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml b/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml
index cccab558c..f7f963c7b 100644
--- a/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml
+++ b/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml
@@ -60,15 +60,8 @@ Entity {
Transform {
id: transform
- matrix: {
- var m = Qt.matrix4x4(1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1);
- m.translate(root.center);
- m.rotate(root.rotateAngle, root.rotateAxis);
- return m;
- }
+ translation: root.center
+ rotation: fromAxisAndAngle(root.rotateAxis, root.rotateAngle)
}
property Layer layer: Layer {