QMetalRoughMaterial Class

(Qt3DExtras::QMetalRoughMaterial)

The QMetalRoughMaterial provides a default implementation of PBR lighting. 更多...

头文件: #include <QMetalRoughMaterial>
qmake: QT += 3dextras
开始支持版本: Qt 5.9
基类: Qt3DRender::QMaterial

属性

公有函数

QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr)
~QMetalRoughMaterial()
QColor baseColor() const
float metalness() const
float roughness() const

公有槽函数

void setBaseColor(const QColor &baseColor)
void setMetalness(float metalness)
void setRoughness(float roughness)

信号

void baseColorChanged(const QColor &baseColor)
void metalnessChanged(float metalness)
void roughnessChanged(float roughness)

受保护的函数

QMetalRoughMaterial(QMetalRoughMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr)

其他继承的成员

  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

The QMetalRoughMaterial provides a default implementation of PBR lighting.

This material uses an effect with a single render pass approach and performs per fragment lighting. Techniques are provided for OpenGL 3 only.

属性

baseColor : QColor

Holds the current base color of the material.

访问函数:

QColor baseColor() const
void setBaseColor(const QColor &baseColor)

Notifier signal:

void baseColorChanged(const QColor &baseColor)

metalness : float

Holds the current metalness level of the material, since is a value between 0 (purely dielectric, the default) and 1 (purely metallic).

访问函数:

float metalness() const
void setMetalness(float metalness)

Notifier signal:

void metalnessChanged(float metalness)

roughness : float

Holds the current roughness level of the material.

访问函数:

float roughness() const
void setRoughness(float roughness)

Notifier signal:

void roughnessChanged(float roughness)

成员函数

QMetalRoughMaterial::QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QMetalRoughMaterial.

[protected] QMetalRoughMaterial::QMetalRoughMaterial(QMetalRoughMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

QMetalRoughMaterial::~QMetalRoughMaterial()

Destroys the QMetalRoughMaterial instance.