diff options
Diffstat (limited to 'examples/qt3d/clip-planes-qml')
-rw-r--r-- | examples/qt3d/clip-planes-qml/ClipPlaneEntity.qml | 16 | ||||
-rw-r--r-- | examples/qt3d/clip-planes-qml/ClippingPlanes.qml | 2 | ||||
-rw-r--r-- | examples/qt3d/clip-planes-qml/main.qml | 5 |
3 files changed, 15 insertions, 8 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 { diff --git a/examples/qt3d/clip-planes-qml/ClippingPlanes.qml b/examples/qt3d/clip-planes-qml/ClippingPlanes.qml index a5525f667..15ab76110 100644 --- a/examples/qt3d/clip-planes-qml/ClippingPlanes.qml +++ b/examples/qt3d/clip-planes-qml/ClippingPlanes.qml @@ -34,9 +34,9 @@ ** ****************************************************************************/ +import QtQuick 2.4 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 -import QtQuick 2.4 as QQ2 Entity { id: root diff --git a/examples/qt3d/clip-planes-qml/main.qml b/examples/qt3d/clip-planes-qml/main.qml index c4436a2df..b7bcd5adb 100644 --- a/examples/qt3d/clip-planes-qml/main.qml +++ b/examples/qt3d/clip-planes-qml/main.qml @@ -34,6 +34,7 @@ ** ****************************************************************************/ +import QtQuick 2.4 as QQ2 import Qt3D.Core 2.0 import Qt3D.Render 2.0 @@ -87,8 +88,8 @@ Entity { } property Transform transform: Transform { - Translate { dx: 0 } - Scale { scale: 3 } + translation: Qt.vector3d( 0.0, 0.0, 0.0 ) + scale: 3 } property Layer layer: Layer { |