1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
// Qt3D Editor generated file
// v0.1
// This file was generated by a tool. Do not modify it manually!
import QtQuick.Scene3D 2.0
import Qt3D.Core 2.0
import Qt3D.Render 2.0
import Qt3D.Extras 2.0
import Qt3D.Input 2.0
Scene3D {
property alias scene_root: scene_root
property alias camera: camera
property alias cube: cube
property alias cube_cuboidmesh: cube_cuboidmesh
property alias cube_transform: cube_transform
property alias light: light
property alias scene_root_pointlight: scene_root_pointlight
property alias light_transform: light_transform
property alias scene_render_settings: scene_render_settings
property alias scene_input_settings: scene_input_settings
property alias scene_root_transform: scene_root_transform
property alias cube_diffusemapmaterial: cube_diffusemapmaterial
aspects: ["render","input"]
function addComponentToEntity(entity, component) {
var entityComponents = []
for (var i = 0; i < entity.components.length; i++)
entityComponents.push(entity.components[i])
entityComponents.push(component)
entity.components = entityComponents
}
function removeComponentFromEntity(entity, component) {
var entityComponents = []
for (var i = 0; i < entity.components.length; i++) {
if (entity.components[i] !== component)
entityComponents.push(entity.components[i])
}
entity.components = entityComponents
}
Entity {
InputSettings {
id: scene_input_settings // Scene Input settings
}
RenderSettings {
id: scene_render_settings // Scene render settings
activeFrameGraph: ForwardRenderer {
clearColor: "#c0c0c0"
camera: camera
}
}
components: [scene_render_settings,scene_input_settings]
// --- Scene start ---
Entity {
id: scene_root // Scene root
Transform {
id: scene_root_transform
}
components: [
scene_root_transform
]
Camera {
id: camera // Camera
farPlane: 50
fieldOfView: 45
aspectRatio: 1.7777777910232544
position: Qt.vector3d(4,5,-5)
viewCenter: Qt.vector3d(0,0,0)
}
Entity {
id: cube // Cube
CuboidMesh {
id: cube_cuboidmesh
}
Transform {
id: cube_transform
matrix: Qt.matrix4x4(1,0,0,-1,0,1,0,0.5,0,0,1,1,0,0,0,1)
translation: Qt.vector3d(-1,0.5,1)
}
DiffuseMapMaterial {
id: cube_diffusemapmaterial
diffuse: "qrc:///%{SceneItemName}_scene_res/r0_qtlogo.png"
}
components: [
cube_cuboidmesh,
cube_transform,
cube_diffusemapmaterial
]
}
Entity {
id: light // Light
PointLight {
id: scene_root_pointlight
intensity: 1
}
Transform {
id: light_transform
matrix: Qt.matrix4x4(1,0,0,8,0,1,0,10,0,0,1,-5,0,0,0,1)
translation: Qt.vector3d(8,10,-5)
}
components: [
scene_root_pointlight,
light_transform
]
}
}
}
}
|