2022-06-08 12:47:24 +00:00
|
|
|
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2014-12-13 14:46:17 +00:00
|
|
|
|
2020-06-19 19:25:20 +00:00
|
|
|
import Qt3D.Core 2.16
|
|
|
|
import Qt3D.Render 2.16
|
|
|
|
import Qt3D.Extras 2.15
|
2014-12-13 14:46:17 +00:00
|
|
|
|
|
|
|
Entity {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property real x: 0.0
|
|
|
|
property real y: 0.0
|
|
|
|
property real z: 0.0
|
|
|
|
property real scale: 1.0
|
|
|
|
property real theta: 0.0
|
|
|
|
property real phi: 0.0
|
|
|
|
property color tint: Qt.rgba( 0.0, 0.0, 0.0, 1.0 )
|
|
|
|
property real intensity: 0.3
|
|
|
|
property alias wireframe: material.wireframe
|
2016-05-04 10:23:32 +00:00
|
|
|
property Layer layer: null
|
2014-12-13 14:46:17 +00:00
|
|
|
|
|
|
|
components: [ transform, mesh, material, layer ]
|
|
|
|
|
|
|
|
Transform {
|
|
|
|
id: transform
|
2015-11-11 16:35:30 +00:00
|
|
|
translation: Qt.vector3d(root.x, root.y, root.z);
|
2020-06-19 19:25:20 +00:00
|
|
|
rotation: fromEulerAngles(root.theta, root.phi, 0)
|
2015-11-11 16:35:30 +00:00
|
|
|
scale: root.scale
|
2014-12-13 14:46:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
WaveMaterial {
|
|
|
|
id: material
|
|
|
|
ambient: Qt.rgba( root.tint.r, root.tint.g, root.tint.b, 1.0 ) // Set color tint
|
|
|
|
diffuse: Qt.rgba( root.intensity, root.intensity, root.intensity, 1.0 ) // Set how bright the wave is
|
|
|
|
}
|
|
|
|
|
2020-07-30 11:03:46 +00:00
|
|
|
PlaneMesh {
|
2014-12-13 14:46:17 +00:00
|
|
|
id: mesh
|
2020-07-30 11:03:46 +00:00
|
|
|
width: 25.0
|
|
|
|
height: 5.0
|
|
|
|
meshResolution: Qt.size( 125, 50 )
|
2014-12-13 14:46:17 +00:00
|
|
|
}
|
|
|
|
}
|