2022-06-08 12:47:24 +00:00
|
|
|
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
|
2024-02-23 14:41:04 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2015-02-15 19:47:25 +00:00
|
|
|
|
2015-10-15 14:05:37 +00:00
|
|
|
import Qt3D.Core 2.0
|
2015-10-18 08:58:19 +00:00
|
|
|
import Qt3D.Render 2.0
|
2015-12-10 15:58:05 +00:00
|
|
|
import Qt3D.Input 2.0
|
2016-04-11 12:58:17 +00:00
|
|
|
import Qt3D.Extras 2.0
|
2015-02-15 19:47:25 +00:00
|
|
|
|
|
|
|
Entity {
|
|
|
|
id: root
|
2015-12-10 15:58:05 +00:00
|
|
|
property string name: "Entity"
|
2015-11-07 19:02:14 +00:00
|
|
|
property alias position: transform.translation
|
2015-02-15 19:47:25 +00:00
|
|
|
property alias diffuse: material.diffuse
|
|
|
|
|
|
|
|
components: [
|
2015-11-07 19:02:14 +00:00
|
|
|
Transform { id: transform },
|
2020-07-30 11:03:46 +00:00
|
|
|
SphereMesh { radius: 2 },
|
2015-12-10 15:58:05 +00:00
|
|
|
PhongMaterial { id: material },
|
|
|
|
ObjectPicker {
|
2020-07-30 11:03:46 +00:00
|
|
|
onClicked: console.log("Clicked", root.name, pick.distance, pick.triangleIndex)
|
|
|
|
}
|
2015-02-15 19:47:25 +00:00
|
|
|
]
|
|
|
|
}
|