Qt 5.9 | Qt 3D | C++ Classes | QMetalRoughMaterial

Qt 5.9.9 Reference Documentation

# QMetalRoughMaterial Class

(Qt3DExtras::QMetalRoughMaterial)

The QMetalRoughMaterial provides a default implementation of PBR lighting. More...

Header: | #include <QMetalRoughMaterial>
qmake: | QT += 3dextras
Since: | Qt 5.9
Inherits: | Qt3DRender::QMaterial

- List of all members, including inherited members

## Properties

- baseColor : QColor
- metalness : float
- roughness : float

- 1 property inherited from Qt3DRender::QMaterial
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode

## Public Functions

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

- 4 public functions inherited from Qt3DRender::QMaterial
- 2 public functions inherited from Qt3DCore::QComponent
- 11 public functions inherited from Qt3DCore::QNode

## Public Slots

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

- 1 public slot inherited from Qt3DRender::QMaterial
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode

## Signals

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

- 1 signal inherited from Qt3DRender::QMaterial
- 3 signals inherited from Qt3DCore::QComponent
- 4 signals inherited from Qt3DCore::QNode

## Protected Functions

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

- 2 protected functions inherited from Qt3DCore::QNode

## Detailed Description

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.

## Property Documentation

### baseColor : QColor

Holds the current base color of the material.

Access functions:

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

Access functions:

float | metalness() const
void | setMetalness(float metalness)

Notifier signal:

void | metalnessChanged(float metalness)

### roughness : float

Holds the current roughness level of the material.

Access functions:

float | roughness() const
void | setRoughness(float roughness)

Notifier signal:

void | roughnessChanged(float roughness)

## Member Function Documentation

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