summaryrefslogtreecommitdiffstats
path: root/examples/demos/dice/PhysicalTable.qml
diff options
context:
space:
mode:
authorJonas Karlsson <jonas.karlsson@qt.io>2023-06-19 15:29:46 +0200
committerKai Köhne <kai.koehne@qt.io>2023-06-21 00:50:04 +0200
commit34ecd600380c65f65f46e9fe86cfcbb9186b20a1 (patch)
tree81860ee4510bda67acc89db0c6449830114d2c03 /examples/demos/dice/PhysicalTable.qml
parent3b1ca67270a97a56fe475194d6a62c45ca9c2c89 (diff)
Add the 'dice' example
Fixes: QTBUG-113600 Pick-to: 6.5 6.5.2 6.6 Change-Id: I13b8327f2dcf3e7eaec80c7c10038b22a1656df3 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Diffstat (limited to 'examples/demos/dice/PhysicalTable.qml')
-rw-r--r--examples/demos/dice/PhysicalTable.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/demos/dice/PhysicalTable.qml b/examples/demos/dice/PhysicalTable.qml
new file mode 100644
index 000000000..225d143af
--- /dev/null
+++ b/examples/demos/dice/PhysicalTable.qml
@@ -0,0 +1,23 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick3D
+import QtQuick3D.Physics
+
+StaticRigidBody {
+ // table radius: 0.482967cm
+ property real tableRadius : 30
+ property real scaleAll: tableRadius/0.482967 // HACK: QTBUG-114183
+ eulerRotation: Qt.vector3d(-90, 0, 0)
+ position: Qt.vector3d(0, -50, 0)
+
+ collisionShapes: TriangleMeshShape {
+ scale: Qt.vector3d(1, 1, 1).times(scaleAll)
+ source: "meshes/side_Table_Pine_LOD0_M_Side_Table_Natural_Wenge_Wood_4K_0.mesh"
+ }
+
+ RoundTable {
+ scale: Qt.vector3d(1, 1, 1).times(scaleAll)
+ }
+}
+