Auf dieser Seite

Q3DLight Class

Darstellung einer Lichtquelle im 3D-Raum. Mehr...

Überschrift: #include <Q3DLight>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
Seit: QtDataVisualization 1.0
In QML: Light3D
Erbt von: Q3DObject
Status: Veraltet

Diese Klasse ist veraltet. Wir raten dringend davon ab, sie in neuem Code zu verwenden.

Eigenschaften

Öffentliche Funktionen

Q3DLight(QObject *parent = nullptr)
virtual ~Q3DLight()
bool isAutoPosition()
void setAutoPosition(bool enabled)

Signale

void autoPositionChanged(bool autoPosition)

Ausführliche Beschreibung

Q3DLight stellt eine monochrome Lichtquelle im 3D-Raum dar.

Hinweis: Die Standardlichtquelle verfügt über die Funktion „ isAutoPosition()“ true.

Dokumentation der Eigenschaften

[since QtDataVisualization 5.9] autoPosition : bool

Diese Eigenschaft legt fest, ob die Lichtposition der Kamera automatisch folgt.

Hinweis: Hat keine Auswirkung, wenn Schatten aktiviert sind. Denken Sie daran, Schatten zu deaktivieren, bevor Sie die Lichtposition festlegen, da diese sonst durch die automatische Positionierung überschrieben wird, wenn „ isAutoPosition() “ auf „ false “ gesetzt ist.

Diese Aufzählung wurde in QtDataVisualization 5.9 eingeführt.

Zugriffsfunktionen:

bool isAutoPosition()
void setAutoPosition(bool enabled)

Notifier-Signal:

void autoPositionChanged(bool autoPosition)

Dokumentation der Mitgliedsfunktionen

[explicit] Q3DLight::Q3DLight(QObject *parent = nullptr)

Erstellt eine neue 3D-Lichtquelle, die sich am Ursprung befindet. Ein optionaler Parameter „ parent “ kann angegeben werden und wird dann an den Konstruktor von „ QObject “ übergeben.

[virtual noexcept] Q3DLight::~Q3DLight()

Löscht das Lichtobjekt.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.