QPointLight Class
class Qt3DRender::QPointLightVerkapselt ein Punktlichtobjekt in einer Qt 3D Szene. Mehr...
Kopfzeile: | #include <QPointLight> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
In QML: | PointLight |
Vererbt: | Qt3DRender::QAbstractLight |
Status: | Veraltet |
Eigenschaften
- constantAttenuation : float
- linearAttenuation : float
- quadraticAttenuation : float
Öffentliche Funktionen
QPointLight(Qt3DCore::QNode *parent = nullptr) | |
float | constantAttenuation() const |
float | linearAttenuation() const |
float | quadraticAttenuation() const |
Öffentliche Slots
void | setConstantAttenuation(float value) |
void | setLinearAttenuation(float value) |
void | setQuadraticAttenuation(float value) |
Signale
void | constantAttenuationChanged(float constantAttenuation) |
void | linearAttenuationChanged(float linearAttenuation) |
void | quadraticAttenuationChanged(float quadraticAttenuation) |
Detaillierte Beschreibung
Ein Punktlicht ist eine Lichtquelle, die von einem einzigen Punkt aus Licht in alle Richtungen abstrahlt. Vom Konzept her ähnelt dies dem Licht einer normalen Glühbirne.
Ein Punktlicht verwendet drei Dämpfungsfaktoren, um zu beschreiben, wie die Intensität des Lichts über die Entfernung abnimmt. Diese Faktoren sind so konzipiert, dass sie zusammen zur Berechnung der Gesamtdämpfung verwendet werden können. Für die Materialien in Qt3D Extras wird die folgende Formel verwendet, wobei Abstand der Abstand zwischen dem Licht und der gerenderten Oberfläche ist:
totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
Benutzerdefinierte Materialien können diese Faktoren anders interpretieren.
Dokumentation der Eigenschaft
constantAttenuation : float
Gibt die konstante Abschwächung des Punktlichts an.
Hinweis: Die genaue Bedeutung und Verwendung dieser Eigenschaft hängt von der Materialimplementierung ab.
Zugriffsfunktionen:
float | constantAttenuation() const |
void | setConstantAttenuation(float value) |
Melder-Signal:
void | constantAttenuationChanged(float constantAttenuation) |
linearAttenuation : float
Gibt die lineare Abschwächung des Punktlichts an.
Hinweis: Die genaue Bedeutung und Verwendung dieser Eigenschaft hängt von der Materialimplementierung ab.
Zugriffsfunktionen:
float | linearAttenuation() const |
void | setLinearAttenuation(float value) |
Melder-Signal:
void | linearAttenuationChanged(float linearAttenuation) |
quadraticAttenuation : float
Gibt die quadratische Abschwächung des Punktlichts an.
Hinweis: Die genaue Bedeutung und Verwendung dieser Eigenschaft hängt von der Materialimplementierung ab.
Zugriffsfunktionen:
float | quadraticAttenuation() const |
void | setQuadraticAttenuation(float value) |
Melder-Signal:
void | quadraticAttenuationChanged(float quadraticAttenuation) |
Member Function Dokumentation
[explicit]
QPointLight::QPointLight(Qt3DCore::QNode *parent = nullptr)
Konstruiert ein neues QPointLight mit dem angegebenen parent.
© 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.