Debian Codegraph @

tests/benchmarks/Qt3DBench/Light.qml

raw
1 // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2 // Copyright (C) 2016 The Qt Company Ltd.
3 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5 import Qt3D.Core 2.0
6 import Qt3D.Render 2.0
7
8 Entity {
9 id: root
10
11 property vector3d lightPosition: Qt.vector3d(30.0, 30.0, 0.0)
12 property vector3d lightIntensity: Qt.vector3d(1.0, 1.0, 1.0)
13
14 readonly property Camera lightCamera: lightCamera
15 readonly property matrix4x4 lightViewProjection: lightCamera.projectionMatrix.times(lightCamera.matrix)
16
17 Camera {
18 id: lightCamera
19 objectName: "lightCameraLens"
20 projectionType: CameraLens.PerspectiveProjection
21 fieldOfView: 45
22 aspectRatio: 1280 / 768 //mainview.width / mainview.height
23 nearPlane: 0.1
24 farPlane: 200.0
25 position: root.lightPosition
26 upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
27 viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
28 }
29 }