QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSABSTRACTMATERIALSETTINGS_H
17 #define QGSABSTRACTMATERIALSETTINGS_H
23 #include <Qt3DRender/qmaterial.h>
28 class QgsLineMaterial;
98 bool mIsSelected =
false;
100 QColor mSelectedColor;
119 if ( sipCpp->type() == QLatin1String(
"gooch" ) )
121 sipType = sipType_QgsGoochMaterialSettings;
123 else if ( sipCpp->type() == QLatin1String(
"phong" ) )
125 sipType = sipType_QgsPhongMaterialSettings;
127 else if ( sipCpp->type() ==
"phongtextured" )
129 sipType = sipType_QgsPhongTexturedMaterialSettings;
131 else if ( sipCpp->type() ==
"simpleline" )
133 sipType = sipType_QgsSimpleLineMaterialSettings;
135 else if ( sipCpp->type() ==
"null" )
137 sipType = sipType_QgsNullMaterialSettings;
153 virtual QString type()
const = 0;
181 virtual QMap<QString, QString> toExportParameters()
const = 0;
186 virtual void addParametersToEffect( Qt3DRender::QEffect *effect )
const = 0;
220 virtual void applyDataDefinedToGeometry( Qt3DRender::QGeometry *geometry,
int vertexCount,
const QByteArray &dataDefinedBytes )
const;
228 virtual QByteArray dataDefinedVertexColorsAsByte(
const QgsExpressionContext &expressionContext )
const;
240 void initPropertyDefinitions()
const;
244 #endif // QGSABSTRACTMATERIALSETTINGS_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
The class is used as a container of context for various read/write operations on other objects.
void setSelectionColor(const QColor &color)
Sets the color for representing materials in a selected state.
@ InstancedPoints
Instanced based rendering, requiring triangles and point data.
@ Warm
Warm color (gooch material)
QColor selectionColor() const
Returns the color for representing materials in a selected state.
@ Cool
Cool color (gooch material)
Context settings for a material.
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Abstract base class for material settings.
@ Lines
Line based rendering, requires line data.
@ Ambient
Ambient color (phong material)
virtual int dataDefinedByteStride() const
Returns byte stride of the data defined colors,used to fill the vertex colors data defined buffer for...
@ Triangles
Triangle based rendering (default)
@ TrianglesWithFixedTexture
Triangle based rendering, using a fixed, non-user-configurable texture (e.g. for terrain rendering)
QgsMaterialSettingsRenderingTechnique
Material rendering techniques.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
void setIsSelected(bool isSelected)
Sets whether the material should represent a selected state.
@ TrianglesDataDefined
Triangle based rendering with possibility of datadefined color.
@ TrianglesFromModel
Triangle based rendering, using a model object source.
@ Points
Point based rendering, requires point data.
bool isSelected() const
Returns true if the material should represent a selected state.
Property
Data definable properties.