135 bool mInitialized =
false;
138 std::unique_ptr< QgsAbstractMaterial3DHandler > mNullMaterialHandler;
139 std::unique_ptr< QgsAbstractMaterial3DHandler > mPhongMaterialHandler;
140 std::unique_ptr< QgsAbstractMaterial3DHandler > mPhongTexturedMaterialHandler;
141 std::unique_ptr< QgsAbstractMaterial3DHandler > mSimpleLineMaterialHandler;
142 std::unique_ptr< QgsAbstractMaterial3DHandler > mGoochMaterialHandler;
143 std::unique_ptr< QgsAbstractMaterial3DHandler > mMetalRoughMaterialHandler;
144 std::unique_ptr< QgsAbstractMaterial3DHandler > mMetalRoughTexturedMaterialHandler;
MaterialRenderingTechnique
Material rendering techniques.
Registry of available 3d terrain classes.
static void initialize()
Initializes the 3D framework.
static QMap< QString, QString > toMaterialExportParameters(const QgsAbstractMaterialSettings *settings)
Returns the parameters to be exported to .mtl file.
static Qgs3DTerrainRegistry * terrainRegistry()
Returns the terrain registry, used for managing 3D terrains.
static QgsMaterial * toMaterial(const QgsAbstractMaterialSettings *settings, Qgis::MaterialRenderingTechnique technique, const QgsMaterialContext &context)
Creates a new QgsMaterial object representing the material settings.
static void addMaterialParametersToEffect(Qt3DRender::QEffect *effect, const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &materialContext)
Adds parameters from the material settings to a destination effect.
static QgsMaterialRegistry * materialRegistry()
Returns the material registry, used for managing 3D materials.
static Qgs3D * instance()
Returns a pointer to the singleton instance.
static const QgsAbstractMaterial3DHandler * handlerForMaterialSettings(const QgsAbstractMaterialSettings *settings)
Returns the handler to use for a material settings.
Qgs3D & operator=(const Qgs3D &other)=delete
Qgs3D(const Qgs3D &other)=delete
static QByteArray materialDataDefinedVertexColorsAsByte(const QgsAbstractMaterialSettings *settings, const QgsExpressionContext &expressionContext)
Returns byte array corresponding to the data defined colors depending of the expressionContext,...
static int materialDataDefinedByteStride(const QgsAbstractMaterialSettings *settings)
Returns byte stride of the data defined colors,used to fill the vertex colors data defined buffer for...
static void applyMaterialDataDefinedToGeometry(const QgsAbstractMaterialSettings *settings, Qt3DCore::QGeometry *geometry, int vertexCount, const QByteArray &dataDefinedBytes)
Applies the data defined bytes, dataDefinedBytes, on the geometry by filling a specific vertex buffer...
Abstract base class for material 3D handlers.
Abstract base class for material settings.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Context settings for a material.
Registry of available 3d material settings classes.
Base class for all materials used within QGIS 3D views.