QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSABSTRACTMATERIALSETTINGS_H
17 #define QGSABSTRACTMATERIALSETTINGS_H
23 #include <Qt3DRender/qmaterial.h>
27 class QgsLineMaterial;
88 bool mIsSelected =
false;
90 QColor mSelectedColor;
109 if ( sipCpp->type() == QLatin1String(
"gooch" ) )
111 sipType = sipType_QgsGoochMaterialSettings;
113 else if ( sipCpp->type() == QLatin1String(
"phong" ) )
115 sipType = sipType_QgsPhongMaterialSettings;
117 else if ( sipCpp->type() ==
"phongtextured" )
119 sipType = sipType_QgsPhongTexturedMaterialSettings;
121 else if ( sipCpp->type() ==
"simpleline" )
123 sipType = sipType_QgsSimpleLineMaterialSettings;
139 virtual QString
type()
const = 0;
178 #endif // QGSABSTRACTMATERIALSETTINGS_H
virtual QString type() const =0
Returns the unique type name for the material.
The class is used as a container of context for various read/write operations on other objects.
virtual QMap< QString, QString > toExportParameters() const =0
Returns the parameters to be exported to .mtl file.
void setSelectionColor(const QColor &color)
Sets the color for representing materials in a selected state.
virtual void readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads settings from a DOM element.
virtual ~QgsAbstractMaterialSettings()=default
QColor selectionColor() const
Returns the color for representing materials in a selected state.
3 Context settings for a material.
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
3 Abstract base class for material settings.
@ Triangles
Triangle based rendering (default)
virtual void addParametersToEffect(Qt3DRender::QEffect *effect) const =0
Adds parameters from the material to a destination effect.
virtual void writeXml(QDomElement &element, const QgsReadWriteContext &context) const =0
Writes settings to a DOM element.
QgsMaterialSettingsRenderingTechnique
Material rendering techniques 3.
virtual Qt3DRender::QMaterial * toMaterial(QgsMaterialSettingsRenderingTechnique technique, const QgsMaterialContext &context) const =0
Creates a new QMaterial object representing the material settings.
void setIsSelected(bool isSelected)
Sets whether the material should represent a selected state.
@ Points
Point based rendering, requires point data.
virtual QgsAbstractMaterialSettings * clone() const =0
Clones the material settings.
bool isSelected() const
Returns true if the material should represent a selected state.