| 1 |
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
import Qt3D.Core 2.0 |
| 5 |
import Qt3D.Render 2.0 |
| 6 |
|
| 7 |
Material { |
| 8 |
id: root |
| 9 |
|
| 10 |
property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) |
| 11 |
property color diffuse: Qt.rgba( 0.7, 0.7, 0.7, 1.0 ) |
| 12 |
property real lineWidth: 1.0 |
| 13 |
property color lineColor: Qt.rgba( 1.0, 1.0, 1.0, 1.0 ) |
| 14 |
property alias wireframe: effect.wireframe |
| 15 |
|
| 16 |
effect: WaveEffect { id: effect } |
| 17 |
|
| 18 |
parameters: [ |
| 19 |
Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, |
| 20 |
Parameter { name: "kd"; value: Qt.vector3d(root.diffuse.r, root.diffuse.g, root.diffuse.b) }, |
| 21 |
Parameter { name: "line.width"; value: root.lineWidth }, |
| 22 |
Parameter { name: "line.color"; value: root.lineColor } |
| 23 |
] |
| 24 |
} |