Q3DLight Class

Repräsentation einer Lichtquelle im 3D-Raum. Mehr...

Kopfzeile: #include <Q3DLight>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
In QML: Light3D
Vererbt: Q3DObject

Eigenschaften

Öffentliche Funktionen

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

Signale

void autoPositionChanged(bool autoPosition)

Detaillierte Beschreibung

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

Hinweis: Das Standardlicht hat isAutoPosition() true.

Dokumentation der Eigenschaften

[since QtDataVisualization 5.9] autoPosition : bool

Diese Eigenschaft bestimmt, ob die Lichtposition automatisch der Kamera folgt.

Hinweis: Hat keine Auswirkung, wenn Schatten aktiviert sind. Denken Sie daran, Schatten zu deaktivieren, bevor Sie die Position des Lichts festlegen, sonst wird sie von der automatischen Positionierung überschrieben, wenn isAutoPosition() false ist.

Diese Eigenschaft wurde in QtDataVisualization 5.9 eingeführt.

Zugriffsfunktionen:

bool isAutoPosition()
void setAutoPosition(bool enabled)

Notifier Signal:

void autoPositionChanged(bool autoPosition)

Member Function Dokumentation

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

Konstruiert ein neues 3D-Licht, das sich am Ursprung befindet. Ein optionaler parent Parameter kann angegeben werden und wird dann an den QObject Konstruktor übergeben.

[virtual noexcept] Q3DLight::~Q3DLight()

Zerstört das Lichtobjekt.

© 2025 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.