17#ifndef QGSSIMPLELINEMATERIALSETTINGS_H
18#define QGSSIMPLELINEMATERIALSETTINGS_H
42 QString
type()
const override;
62 QColor
ambient()
const {
return mAmbient; }
78#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
92 QColor mAmbient { QColor::fromRgbF( 0.1f, 0.1f, 0.1f, 1.0f ) };
Abstract base class for material settings.
virtual void writeXml(QDomElement &element, const QgsReadWriteContext &) const
Writes settings to a DOM element.
virtual QByteArray dataDefinedVertexColorsAsByte(const QgsExpressionContext &expressionContext) const
Returns byte array corresponding to the data defined colors depending of the expressionContext,...
virtual QMap< QString, QString > toExportParameters() const =0
Returns the parameters to be exported to .mtl file.
virtual void readXml(const QDomElement &element, const QgsReadWriteContext &)
Reads settings from a DOM element.
virtual void addParametersToEffect(Qt3DRender::QEffect *effect, const QgsMaterialContext &materialContext) const =0
Adds parameters from the material to a destination effect.
virtual QString type() const =0
Returns the unique type name for the material.
virtual void applyDataDefinedToGeometry(Qt3DCore::QGeometry *geometry, int vertexCount, const QByteArray &dataDefinedBytes) const
Applies the data defined bytes, dataDefinedBytes, on the geometry by filling a specific vertex buffer...
virtual QgsMaterial * toMaterial(QgsMaterialSettingsRenderingTechnique technique, const QgsMaterialContext &context) const =0
Creates a new QgsMaterial object representing the material settings.
QgsPropertyCollection dataDefinedProperties() const
Returns the symbol material property collection, used for data defined overrides.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Context settings for a material.
Base class for all materials used within QGIS 3D views.
A container for the context for various read/write operations on objects.
QgsSimpleLineMaterialSettings * clone() const override
Clones the material settings.
static bool supportsTechnique(QgsMaterialSettingsRenderingTechnique technique)
Returns true if the specified technique is supported by the material.
static QgsAbstractMaterialSettings * create()
Returns a new instance of QgsSimpleLineMaterialSettings.
bool operator==(const QgsSimpleLineMaterialSettings &other) const
void setAmbient(const QColor &ambient)
Sets the ambient color component.
QgsSimpleLineMaterialSettings()=default
QColor ambient() const
Returns the ambient color component.
bool equals(const QgsAbstractMaterialSettings *other) const override
Returns true if this settings exactly matches an other settings.
QgsMaterialSettingsRenderingTechnique
Material rendering techniques.