Debian Codegraph @

tests/manual/shadow-map-qml/ShadowMapLight.qml

raw
1 // Copyright (C) 2014 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
7 Entity {
8 id: root
9
10 property vector3d lightPosition: Qt.vector3d(30.0, 30.0, 0.0)
11 property vector3d lightIntensity: Qt.vector3d(1.0, 1.0, 1.0)
12
13 readonly property Camera lightCamera: lightCamera
14 readonly property matrix4x4 lightViewProjection: lightCamera.projectionMatrix.times(lightCamera.viewMatrix)
15
16 Camera {
17 id: lightCamera
18 objectName: "lightCameraLens"
19 projectionType: CameraLens.PerspectiveProjection
20 fieldOfView: 45
21 aspectRatio: 1
22 nearPlane : 0.1
23 farPlane : 200.0
24 position: root.lightPosition
25 viewCenter: Qt.vector3d(0.0, 0.0, 0.0)
26 upVector: Qt.vector3d(0.0, 1.0, 0.0)
27 }
28 }