|
QGIS API Documentation 4.1.0-Master (26185ffb827)
|
A PBR metal rough shading material used for rendering. More...
#include <qgsmetalroughmaterialsettings.h>

Public Member Functions | |
| QgsMetalRoughMaterialSettings ()=default | |
| double | anisotropy () const |
| Returns the material's anisotropy, as a value between 0 and 1. | |
| double | anisotropyRotation () const |
| Returns the rotation of the material's anisotropy, as a angle in degrees. | |
| QColor | averageColor () const override |
| Returns an approximate color representing the blended material color. | |
| QColor | baseColor () const |
| Returns the base material color. | |
| double | clearCoatFactor () const |
| Returns the material's clear coat factor, as a value between 0 and 1. | |
| double | clearCoatRoughness () const |
| Returns the material's clear coat roughness, as a value between 0 and 1. | |
| QgsMetalRoughMaterialSettings * | clone () const override |
| Clones the material settings. | |
| QColor | emissionColor () const |
| Returns the material's emissive color. | |
| double | emissionFactor () const |
| Returns the emission factor, which dictates the strength of the emission effect. | |
| bool | equals (const QgsAbstractMaterialSettings *other) const override |
Returns true if this settings exactly matches an other settings. | |
| double | metalness () const |
| Returns the material's metalness, as a value between 0 and 1. | |
| double | opacity () const |
| Returns the opacity of the surface. | |
| bool | operator== (const QgsMetalRoughMaterialSettings &other) const |
| void | readXml (const QDomElement &elem, const QgsReadWriteContext &context) override |
| Reads settings from a DOM element. | |
| double | reflectance () const |
| Returns the material's reflectance, as a value between 0 and 1. | |
| bool | requiresTangents () const override |
Returns true if the material requires tangents generated during triangulation. | |
| double | roughness () const |
| Returns the material's roughness, as a value between 0 and 1. | |
| void | setAnisotropy (double anisotropy) |
| Sets the material's anisotropy, as a value between 0 and 1. | |
| void | setAnisotropyRotation (double rotation) |
| Sets the rotation of the material's anisotropy, as a angle in degrees. | |
| void | setBaseColor (const QColor &color) |
| Sets the base material color. | |
| void | setClearCoatFactor (double factor) |
| Sets the material's clear coat factor, as a value between 0 and 1. | |
| void | setClearCoatRoughness (double roughness) |
| Sets the material's clear coat roughness, as a value between 0 and 1. | |
| void | setColorsFromBase (const QColor &baseColor) override |
| Decomposes a base color into the material's color components, and sets the material's color accordingly. | |
| void | setEmissionColor (const QColor &color) |
| Sets the material's emissive color. | |
| void | setEmissionFactor (double factor) |
| Sets the emission factor, which dictates the strength of the emission effect. | |
| void | setMetalness (double metalness) |
| Sets the material's metalness, as a value between 0 and 1. | |
| void | setOpacity (double opacity) |
| Sets the opacity of the surface. | |
| void | setReflectance (double reflectance) |
| Sets the material's reflectance, as a value between 0 and 1. | |
| void | setRoughness (double roughness) |
| Sets the material's roughness, as a value between 0 and 1. | |
| QString | type () const override |
| Returns the unique type name for the material. | |
| void | writeXml (QDomElement &elem, const QgsReadWriteContext &context) const override |
| Writes settings to a DOM element. | |
| Public Member Functions inherited from QgsAbstractMaterialSettings | |
| virtual | ~QgsAbstractMaterialSettings ()=default |
| QgsPropertyCollection | dataDefinedProperties () const |
| Returns the symbol material property collection, used for data defined overrides. | |
| const QgsPropertiesDefinition & | propertyDefinitions () const |
| Returns a reference to the material properties definition, used for data defined overrides. | |
| virtual bool | requiresTextureCoordinates () const |
Returns true if the material requires texture coordinates to be generated during triangulation. | |
| void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
| Sets the material property collection, used for data defined overrides. | |
Static Public Member Functions | |
| static QgsAbstractMaterialSettings * | create () |
| Returns a new instance of QgsMetalRoughMaterialSettings. | |
| static bool | supportsTechnique (Qgis::MaterialRenderingTechnique technique) |
Returns true if the specified technique is supported by the metal rough material. | |
Additional Inherited Members | |
| Public Types inherited from QgsAbstractMaterialSettings | |
| enum class | Property : int { Diffuse , Ambient , Warm , Cool , Specular , BaseColor , EmissionColor } |
| Data definable properties. More... | |
A PBR metal rough shading material used for rendering.
Definition at line 35 of file qgsmetalroughmaterialsettings.h.
|
default |
|
inline |
Returns the material's anisotropy, as a value between 0 and 1.
Anisotropic materials are those with properties which vary in different directions.
Definition at line 96 of file qgsmetalroughmaterialsettings.h.
|
inline |
Returns the rotation of the material's anisotropy, as a angle in degrees.
Anisotropic materials are those with properties which vary in different directions.
Definition at line 107 of file qgsmetalroughmaterialsettings.h.
|
overridevirtual |
Returns an approximate color representing the blended material color.
Since this material contains only a single color, this function simply returns baseColor().
Implements QgsAbstractMaterialSettings.
Definition at line 135 of file qgsmetalroughmaterialsettings.cpp.
|
inline |
Returns the base material color.
Definition at line 61 of file qgsmetalroughmaterialsettings.h.
|
inline |
Returns the material's clear coat factor, as a value between 0 and 1.
Definition at line 239 of file qgsmetalroughmaterialsettings.h.
|
inline |
Returns the material's clear coat roughness, as a value between 0 and 1.
Definition at line 257 of file qgsmetalroughmaterialsettings.h.
|
overridevirtual |
Clones the material settings.
Caller takes ownership of the returned object.
Implements QgsAbstractMaterialSettings.
Definition at line 53 of file qgsmetalroughmaterialsettings.cpp.
|
static |
Returns a new instance of QgsMetalRoughMaterialSettings.
Definition at line 48 of file qgsmetalroughmaterialsettings.cpp.
|
inline |
Returns the material's emissive color.
Definition at line 115 of file qgsmetalroughmaterialsettings.h.
|
inline |
Returns the emission factor, which dictates the strength of the emission effect.
A value of 1.0 indicates that the emission color values should be used directly. Larger values result in more light emission.
Definition at line 128 of file qgsmetalroughmaterialsettings.h.
|
overridevirtual |
Returns true if this settings exactly matches an other settings.
Implements QgsAbstractMaterialSettings.
Definition at line 58 of file qgsmetalroughmaterialsettings.cpp.
|
inline |
Returns the material's metalness, as a value between 0 and 1.
Definition at line 68 of file qgsmetalroughmaterialsettings.h.
|
inline |
Returns the opacity of the surface.
Definition at line 136 of file qgsmetalroughmaterialsettings.h.
|
inline |
Definition at line 285 of file qgsmetalroughmaterialsettings.h.
|
overridevirtual |
Reads settings from a DOM element.
Reimplemented from QgsAbstractMaterialSettings.
Definition at line 72 of file qgsmetalroughmaterialsettings.cpp.
|
inline |
Returns the material's reflectance, as a value between 0 and 1.
This controls the specular intensity for non-metals.
Definition at line 85 of file qgsmetalroughmaterialsettings.h.
|
overridevirtual |
Returns true if the material requires tangents generated during triangulation.
Reimplemented from QgsAbstractMaterialSettings.
Definition at line 67 of file qgsmetalroughmaterialsettings.cpp.
|
inline |
Returns the material's roughness, as a value between 0 and 1.
Definition at line 75 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the material's anisotropy, as a value between 0 and 1.
Anisotropic materials are those with properties which vary in different directions.
Definition at line 190 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the rotation of the material's anisotropy, as a angle in degrees.
Anisotropic materials are those with properties which vary in different directions.
Definition at line 201 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the base material color.
Definition at line 155 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the material's clear coat factor, as a value between 0 and 1.
Definition at line 248 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the material's clear coat roughness, as a value between 0 and 1.
Definition at line 266 of file qgsmetalroughmaterialsettings.h.
|
overridevirtual |
Decomposes a base color into the material's color components, and sets the material's color accordingly.
Since this material contains only a single color, this function is equivalent to calling setBaseColor(baseColor).
| baseColor | The color to decompose |
Implements QgsAbstractMaterialSettings.
Definition at line 140 of file qgsmetalroughmaterialsettings.cpp.
|
inline |
Sets the material's emissive color.
Definition at line 217 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the emission factor, which dictates the strength of the emission effect.
A value of 1.0 indicates that the emission color values should be used directly. Larger values result in more light emission.
Definition at line 230 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the material's metalness, as a value between 0 and 1.
Definition at line 162 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the opacity of the surface.
Definition at line 209 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the material's reflectance, as a value between 0 and 1.
This controls the specular intensity for non-metals.
Definition at line 179 of file qgsmetalroughmaterialsettings.h.
|
inline |
Sets the material's roughness, as a value between 0 and 1.
Definition at line 169 of file qgsmetalroughmaterialsettings.h.
|
static |
Returns true if the specified technique is supported by the metal rough material.
Definition at line 29 of file qgsmetalroughmaterialsettings.cpp.
|
overridevirtual |
Returns the unique type name for the material.
Implements QgsAbstractMaterialSettings.
Definition at line 24 of file qgsmetalroughmaterialsettings.cpp.
|
overridevirtual |
Writes settings to a DOM element.
Reimplemented from QgsAbstractMaterialSettings.
Definition at line 94 of file qgsmetalroughmaterialsettings.cpp.