QMetalRoughMaterial Class▲
-
Header: QMetalRoughMaterial
-
Since: Qt 5.9
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
-
qmake: QT += 3dextras
-
Inherited By:
-
Instantiated By: qml-qt3d-extras-metalroughmaterial.xml
-
Inherits: Qt3DRender::QMaterial
-
Group: QMetalRoughMaterial is part of qt3d-extras-materials
Detailed Description▲
This material uses an effect with a single render pass approach and performs per fragment lighting. Techniques are provided for OpenGL 3 and OpenGL ES 3.
Property Documentation▲
ambientOcclusion : QVariant▲
Holds the current ambient occlusion map texture of the material. This can only be a texture, otherwise it is ignored. By default this map is not set.
Access functions:
-
ambientOcclusion() const
-
void setAmbientOcclusion(const &ambientOcclusion)
Notifier signal:
-
void ambientOcclusionChanged(const &ambientOcclusion)
baseColor : QVariant▲
Holds the current base color of the material. This can be either a plain color value or a texture. By default the value of this property is "grey".
Access functions:
-
baseColor() const
-
void setBaseColor(const &baseColor)
Notifier signal:
-
void baseColorChanged(const &baseColor)
metalness : QVariant▲
Holds the current metalness level of the material, as a value between 0 (purely dielectric, the default) and 1 (purely metallic). This can be either a plain uniform value or a texture. By default the value of this property is 0.
Access functions:
-
metalness() const
-
void setMetalness(const &metalness)
Notifier signal:
-
void metalnessChanged(const &metalness)
normal : QVariant▲
Holds the current normal map texture of the material. This can only be a texture, otherwise it is ignored. By default this map is not set.
Access functions:
-
normal() const
-
void setNormal(const &normal)
Notifier signal:
-
void normalChanged(const &normal)
roughness : QVariant▲
Holds the current roughness level of the material. This can be either a plain uniform value or a texture. By default the value of this property is 0.
Access functions:
-
roughness() const
-
void setRoughness(const &roughness)
Notifier signal:
-
void roughnessChanged(const &roughness)
textureScale : float▲
Holds the current texture scale. It is applied as a multiplier to texture coordinates at render time. Defaults to 1.0.
When used in conjunction with QTextureWrapMode::Repeat, textureScale provides a simple way to tile a texture across a surface. For example, a texture scale of 4.0 would result in 16 (4x4) tiles.
Access functions:
-
float textureScale() const
-
void setTextureScale(float textureScale)
Notifier signal:
-
void textureScaleChanged(float textureScale)
Member Function Documentation▲
[explicit] QMetalRoughMaterial::QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr)▲
Constructs a new QMetalRoughMaterial instance with parent object parent.
[virtual] QMetalRoughMaterial::~QMetalRoughMaterial()▲
Destroys the QMetalRoughMaterial instance.