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/clip-planes-qml/ClipPlaneEntity.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/clip-planes-qml/ClipPlaneEntity.qml')
-rw-r--r-- | examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml b/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml index fdd3f803e..cccab558c 100644 --- a/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml +++ b/examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml @@ -40,9 +40,8 @@ import Qt3D.Render 2.0 Entity { id: root property Material visualMaterial; - property alias rotateAngle: _rotate.angle - property alias rotateAxis: _rotate.axis - + property real rotateAngle: 0.0 + property vector3d rotateAxis: Qt.vector3d(1.0, 0.0, 0.0) property vector3d center; property vector3d normal; readonly property vector4d equation: Qt.vector4d(normal.x, @@ -61,8 +60,15 @@ Entity { Transform { id: transform - Rotate { id: _rotate } - Translate { translation: root.center } + 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; + } } property Layer layer: Layer { |