summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/wave
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/wave')
-rw-r--r--examples/qt3d/wave/Background.qml12
-rw-r--r--examples/qt3d/wave/Wave.qml15
-rw-r--r--examples/qt3d/wave/main.qml1
3 files changed, 20 insertions, 8 deletions
diff --git a/examples/qt3d/wave/Background.qml b/examples/qt3d/wave/Background.qml
index 64468209b..7c6ed4952 100644
--- a/examples/qt3d/wave/Background.qml
+++ b/examples/qt3d/wave/Background.qml
@@ -34,9 +34,9 @@
**
****************************************************************************/
+import QtQuick 2.1 as QQ2
import Qt3D.Core 2.0
import Qt3D.Render 2.0
-import QtQuick 2.1 as QQ2
Entity {
id: root
@@ -72,9 +72,13 @@ Entity {
Transform {
// Rotate the plane so that it faces us
- Rotate {
- axis: Qt.vector3d( 1.0, 0.0, 0.0 )
- angle: 90
+ matrix: {
+ var m = Qt.matrix4x4(1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+ m.rotate(90, Qt.vector3d(1, 0, 0));
+ return m;
}
},
diff --git a/examples/qt3d/wave/Wave.qml b/examples/qt3d/wave/Wave.qml
index 708e35775..9bbb707a9 100644
--- a/examples/qt3d/wave/Wave.qml
+++ b/examples/qt3d/wave/Wave.qml
@@ -59,10 +59,17 @@ Entity {
Transform {
id: transform
- Translate { dx: root.x; dy: root.y; dz: root.z }
- Scale { scale: root.scale }
- Rotate{ angle: root.theta; axis: Qt.vector3d(1.0, 0.0, 0.0) }
- Rotate{ angle: root.phi; axis: Qt.vector3d(0.0, 1.0, 0.0) }
+ matrix: {
+ var m = Qt.matrix4x4(1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+ m.translate(Qt.vector3d(root.x, root.y, root.z));
+ m.rotate(root.phi, Qt.vector3d(0, 1, 0));
+ m.rotate(root.theta, Qt.vector3d(1, 0, 0));
+ m.scale(root.scale);
+ return m;
+ }
}
WaveMaterial {
diff --git a/examples/qt3d/wave/main.qml b/examples/qt3d/wave/main.qml
index a81a6c38a..6f7aaddb9 100644
--- a/examples/qt3d/wave/main.qml
+++ b/examples/qt3d/wave/main.qml
@@ -34,6 +34,7 @@
**
****************************************************************************/
+import QtQuick 2.1 as QQ2
import Qt3D.Core 2.0
import Qt3D.Render 2.0
import Qt3D.Input 2.0