22 return QStringLiteral(
"metalrough" );
56 mMetalness = elem.attribute( QStringLiteral(
"metalness" ) ).toFloat();
57 mRoughness = elem.attribute( QStringLiteral(
"roughness" ) ).toFloat();
65 elem.setAttribute( QStringLiteral(
"metalness" ), mMetalness );
66 elem.setAttribute( QStringLiteral(
"roughness" ), mRoughness );
80 QgsMetalRoughMaterial *material =
new QgsMetalRoughMaterial;
82 material->setMetalness( mMetalness );
83 material->setRoughness( mRoughness );
97 QMap<QString, QString> parameters;
virtual void writeXml(QDomElement &element, const QgsReadWriteContext &) const
Writes settings to a DOM element.
virtual void readXml(const QDomElement &element, const QgsReadWriteContext &)
Reads settings from a DOM element.
QColor selectionColor() const
Returns the color for representing materials in a selected state.
bool isSelected() const
Returns true if the material should represent a selected state.
The class is used as a container of context for various read/write operations on other objects.
static QColor decodeColor(const QString &str)
static QString encodeColor(const QColor &color)
QgsMaterialSettingsRenderingTechnique
Material rendering techniques 3.
@ Points
Point based rendering, requires point data.
@ Triangles
Triangle based rendering (default)
@ TrianglesFromModel
Triangle based rendering, using a model object source.
@ Lines
Line based rendering, requires line data.
@ TrianglesDataDefined
Triangle based rendering with possibility of datadefined color.
@ InstancedPoints
Instanced based rendering, requiring triangles and point data.
@ TrianglesWithFixedTexture
Triangle based rendering, using a fixed, non-user-configurable texture (e.g. for terrain rendering)