QMetalRoughMaterial Class

class Qt3DExtras::QMetalRoughMaterial

Das QMetalRoughMaterial bietet eine Standardimplementierung von PBR-Beleuchtung. Mehr...

Kopfzeile: #include <QMetalRoughMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
In QML: MetalRoughMaterial
Vererbt: Qt3DRender::QMaterial
Status: Veraltet

Eigenschaften

Öffentliche Funktionen

QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr)
virtual ~QMetalRoughMaterial()
QVariant ambientOcclusion() const
QVariant baseColor() const
QVariant metalness() const
QVariant normal() const
QVariant roughness() const
float textureScale() const

Öffentliche Slots

void setAmbientOcclusion(const QVariant &ambientOcclusion)
void setBaseColor(const QVariant &baseColor)
void setMetalness(const QVariant &metalness)
void setNormal(const QVariant &normal)
void setRoughness(const QVariant &roughness)
void setTextureScale(float textureScale)

Signale

void ambientOcclusionChanged(const QVariant &ambientOcclusion)
void baseColorChanged(const QVariant &baseColor)
void metalnessChanged(const QVariant &metalness)
void normalChanged(const QVariant &normal)
void roughnessChanged(const QVariant &roughness)
void textureScaleChanged(float textureScale)

Detaillierte Beschreibung

Dieses Material verwendet einen Effekt mit einem Single-Rendering-Pass-Ansatz und führt eine Beleuchtung pro Fragment durch. Es werden Techniken für OpenGL 3 und OpenGL ES 3 bereitgestellt.

Dokumentation der Eigenschaften

ambientOcclusion : QVariant

Enthält die aktuelle Ambient Occlusion Map Textur des Materials. Dies kann nur eine Textur sein, ansonsten wird sie ignoriert. Standardmäßig ist diese Map nicht gesetzt.

Zugriffsfunktionen:

QVariant ambientOcclusion() const
void setAmbientOcclusion(const QVariant &ambientOcclusion)

Melder-Signal:

void ambientOcclusionChanged(const QVariant &ambientOcclusion)

baseColor : QVariant

Enthält die aktuelle Grundfarbe des Materials. Dies kann entweder ein einfacher Farbwert oder eine Textur sein. Standardmäßig ist der Wert dieser Eigenschaft "grau".

Zugriffsfunktionen:

QVariant baseColor() const
void setBaseColor(const QVariant &baseColor)

Benachrichtigungssignal:

void baseColorChanged(const QVariant &baseColor)

metalness : QVariant

Enthält den aktuellen Metallisierungsgrad des Materials als Wert zwischen 0 (rein dielektrisch, die Voreinstellung) und 1 (rein metallisch). Dies kann entweder ein einfacher einheitlicher Wert oder eine Textur sein. Standardmäßig ist der Wert dieser Eigenschaft 0.

Zugriffsfunktionen:

QVariant metalness() const
void setMetalness(const QVariant &metalness)

Melder-Signal:

void metalnessChanged(const QVariant &metalness)

normal : QVariant

Enthält die aktuelle Normal Map Textur des Materials. Dies kann nur eine Textur sein, ansonsten wird sie ignoriert. Standardmäßig ist diese Map nicht gesetzt.

Zugriffsfunktionen:

QVariant normal() const
void setNormal(const QVariant &normal)

Benachrichtigungssignal:

void normalChanged(const QVariant &normal)

roughness : QVariant

Enthält den aktuellen Rauheitsgrad des Materials. Dies kann entweder ein einfacher einheitlicher Wert oder eine Textur sein. Standardmäßig ist der Wert dieser Eigenschaft 0.

Zugriffsfunktionen:

QVariant roughness() const
void setRoughness(const QVariant &roughness)

Benachrichtigungssignal:

void roughnessChanged(const QVariant &roughness)

textureScale : float

Enthält den aktuellen Texturmaßstab. Sie wird als Multiplikator auf die Texturkoordinaten zur Renderzeit angewendet. Der Standardwert ist 1.0.

In Verbindung mit QTextureWrapMode::Repeat bietet textureScale eine einfache Möglichkeit, eine Textur über eine Fläche zu kacheln. Zum Beispiel würde eine Texturskala von 4.0 zu 16 (4x4) Kacheln führen.

Zugriffsfunktionen:

float textureScale() const
void setTextureScale(float textureScale)

Benachrichtigungssignal:

void textureScaleChanged(float textureScale)

Member Function Dokumentation

[explicit] QMetalRoughMaterial::QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr)

Konstruiert eine neue QMetalRoughMaterial-Instanz mit dem übergeordneten Objekt parent.

[virtual noexcept] QMetalRoughMaterial::~QMetalRoughMaterial()

Zerstört die Instanz QMetalRoughMaterial.

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