Debian Codegraph @

tests/manual/planets-qml/PlanetsLight.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 alias near: lightCamera.nearPlane
12 property alias ratio: lightCamera.aspectRatio
13
14 property vector3d lightPosition: Qt.vector3d(0.0, 0.0, 0.0)
15 property vector3d lightIntensity: Qt.vector3d(1.0, 1.0, 1.0)
16
17 readonly property Camera lightCamera: lightCamera
18 readonly property matrix4x4 lightViewProjection:
19 lightCamera.projectionMatrix.times(lightCamera.viewMatrix)
20
21 Camera {
22 id: lightCamera
23 objectName: "lightCameraLens"
24 projectionType: CameraLens.PerspectiveProjection
25 fieldOfView: 30
26 nearPlane: 2500000.0
27 farPlane: 10000000.0
28 position: root.lightPosition
29 viewCenter: Qt.vector3d(0.0, 0.0, 0.0)
30 upVector: Qt.vector3d(0.0, 1.0, 0.0)
31 }
32 }