Debian Codegraph @

tests/manual/raycasting-qml/CylinderEntity.qml

raw
1 // Copyright (C) 2018 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 import Qt3D.Input 2.0
7 import Qt3D.Extras 2.0
8
9 Entity {
10 id: root
11
12 property alias translation: transform.translation
13 property alias color: material.diffuse
14
15 components: [ mesh, material, transform ]
16
17 CylinderMesh {
18 id: mesh
19 radius: 1
20 length: 3
21 rings: 100
22 slices: 20
23 }
24
25 Transform {
26 id: transform
27 rotation: fromAxisAndAngle(Qt.vector3d(1, 0, 0), 45)
28 }
29
30 PhongMaterial {
31 id: material
32 diffuse: "green"
33 }
34 }