Debian Codegraph @

tests/manual/qardboard/QardboardRootEntity.qml

raw
1 // Copyright (C) 2017 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
8 Entity {
9 id: root
10 property alias fieldOfView: stereoCamera.fieldOfView
11 property alias cameraPosition: stereoCamera.position
12 property alias cameraDirection: stereoCamera.viewDirection
13 property alias headlightDirection: headLight.worldDirection
14
15 components: [
16 RenderSettings {
17 activeFrameGraph: QardboardFrameGraph {
18 id: stereoFrameGraph
19 leftCamera: stereoCamera.leftCamera
20 rightCamera: stereoCamera.rightCamera
21 }
22 },
23 InputSettings { },
24 DirectionalLight {
25 id: headLight
26 worldDirection: stereoCamera.viewDirection.times(-1)
27 }
28 ]
29
30 QardboardCamera {
31 id: stereoCamera
32 }
33 }