|
QGIS API Documentation 4.1.0-Master (31622b25bb0)
|
3D handler for the PBR metal rough material. More...
#include <qgsmetalroughmaterial3dhandler.h>

Public Member Functions | |
| QgsMetalRoughMaterial3DHandler ()=default | |
| void | applyDataDefinedToGeometry (const QgsAbstractMaterialSettings *settings, Qt3DCore::QGeometry *geometry, int vertexCount, const QByteArray &data) const override |
| Applies the data defined bytes, dataDefinedBytes, on the geometry by filling a specific vertex buffer that will be used by the shader. | |
| QByteArray | dataDefinedVertexColorsAsByte (const QgsAbstractMaterialSettings *settings, const QgsExpressionContext &expressionContext) const override |
| Returns byte array corresponding to the data defined colors depending of the expressionContext, used to fill the specific vertex buffer used for rendering the geometry. | |
| QMap< QString, QString > | toExportParameters (const QgsAbstractMaterialSettings *settings) const override |
| Returns the parameters to be exported to .mtl file. | |
| QgsMaterial * | toInstancedMaterial (const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &context, Qgis::InstancedMaterialFlags flags) const override |
| Creates a QgsMaterial for instanced point rendering. | |
| QgsMaterial * | toMaterial (const QgsAbstractMaterialSettings *settings, Qgis::MaterialRenderingTechnique technique, const QgsMaterialContext &context) const override |
| Creates a new QgsMaterial object representing the material settings. | |
| bool | updatePreviewScene (Qt3DCore::QEntity *sceneRoot, const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &context) const override |
| Updates an existing material preview scene with new material settings. | |
| Public Member Functions inherited from QgsAbstractMaterial3DHandler | |
| virtual | ~QgsAbstractMaterial3DHandler ()=default |
| virtual Qt3DCore::QEntity * | createPreviewMesh (const QString &type, Qt3DCore::QEntity *parent) const |
| Creates a new entity representing a suitable preview mesh for this material type. | |
| virtual Qt3DCore::QEntity * | createPreviewScene (const QgsAbstractMaterialSettings *settings, const QString &type, const QgsMaterialContext &context, QWindow *window, Qt3DCore::QEntity *parent) const |
| Builds a complete self-contained scene for previewing the material, using the specified mesh type. | |
| virtual QList< PreviewMeshType > | previewMeshTypes () const |
| Returns a list of available preview mesh types for the material. | |
Additional Inherited Members | |
| Static Protected Member Functions inherited from QgsAbstractMaterial3DHandler | |
| static Qt3DRender::QParameter * | findParameter (Qt3DRender::QEffect *effect, const QString &name) |
| Finds an existing parameter in an effect by name. | |
3D handler for the PBR metal rough material.
Definition at line 36 of file qgsmetalroughmaterial3dhandler.h.
|
default |
|
overridevirtual |
Applies the data defined bytes, dataDefinedBytes, on the geometry by filling a specific vertex buffer that will be used by the shader.
Reimplemented from QgsAbstractMaterial3DHandler.
Definition at line 131 of file qgsmetalroughmaterial3dhandler.cpp.
|
overridevirtual |
Returns byte array corresponding to the data defined colors depending of the expressionContext, used to fill the specific vertex buffer used for rendering the geometry.
Reimplemented from QgsAbstractMaterial3DHandler.
Definition at line 99 of file qgsmetalroughmaterial3dhandler.cpp.
|
overridevirtual |
Returns the parameters to be exported to .mtl file.
Implements QgsAbstractMaterial3DHandler.
Definition at line 81 of file qgsmetalroughmaterial3dhandler.cpp.
|
overridevirtual |
Creates a QgsMaterial for instanced point rendering.
The flags argument controls which per-instance attributes are active.
The default implementation returns nullptr.
Subclasses that support instancing must override this method to construct the material with the correct shader from the start.
Reimplemented from QgsAbstractMaterial3DHandler.
Definition at line 68 of file qgsmetalroughmaterial3dhandler.cpp.
|
overridevirtual |
Creates a new QgsMaterial object representing the material settings.
The technique argument specifies the rendering technique which will be used with the returned material.
Implements QgsAbstractMaterial3DHandler.
Definition at line 32 of file qgsmetalroughmaterial3dhandler.cpp.
|
overridevirtual |
Updates an existing material preview scene with new material settings.
This method is called on every material setting parameter change while configuring materials, so the implementation must be cheap (e.g. involve no entity creation, just direct manipulation of existing attributes).
Returns false if the scene could not be updated in place and needs to be regenered via createPreviewScene().
Implements QgsAbstractMaterial3DHandler.
Definition at line 87 of file qgsmetalroughmaterial3dhandler.cpp.