23using namespace Qt::StringLiterals;
27 return u
"metalrough"_s;
64 return *
this == *otherMetal;
70 mMetalness = elem.attribute( u
"metalness"_s ).toDouble();
71 mRoughness = elem.attribute( u
"roughness"_s ).toDouble();
79 elem.setAttribute( u
"metalness"_s, mMetalness );
80 elem.setAttribute( u
"roughness"_s, mRoughness );
94 QgsMetalRoughMaterial *material =
new QgsMetalRoughMaterial;
96 material->setMetalness( mMetalness );
97 material->setRoughness( mRoughness );
111 QMap<QString, QString> parameters;
Abstract base class for material settings.
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.
Context settings for a material.
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.
Base class for all materials used within QGIS 3D views.
A container for the context for various read/write operations on objects.
static QColor decodeColor(const QString &str)
static QString encodeColor(const QColor &color)
QgsMaterialSettingsRenderingTechnique
Material rendering techniques.
@ 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).