QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
Loading...
Searching...
No Matches
qgsmetalroughtexturedmaterial3dhandler.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmetalroughtexturedmaterial3dhandler.h
3 --------------------------------------
4 Date : April 2026
5 Copyright : (C) 2026 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSMETALROUGHMATERIALTEXTURED3DHANDLER_H
17#define QGSMETALROUGHMATERIALTEXTURED3DHANDLER_H
18
19#include "qgis_3d.h"
21
22#define SIP_NO_FILE
23
25class QgsMetalRoughMaterial;
26
27namespace Qt3DRender
28{
29 class QTexture2D;
30}
31
41{
42 public:
44
45 QMap<QString, QString> toExportParameters( const QgsAbstractMaterialSettings *settings ) const override;
47 void addParametersToEffect( Qt3DRender::QEffect *effect, const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &materialContext ) const override;
48 bool updatePreviewScene( Qt3DCore::QEntity *sceneRoot, const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &context ) const override;
49
50 private:
51 static Qt3DRender::QTexture2D *loadTexture( const QString &path );
52
53 static void applySettingsToMaterial( const QgsMetalRoughTexturedMaterialSettings *metalRoughTexturedSettings, QgsMetalRoughMaterial *material );
54};
55
56
57#endif // QGSMETALROUGHMATERIALTEXTURED3DHANDLER_H
MaterialRenderingTechnique
Material rendering techniques.
Definition qgis.h:4327
Abstract base class for material 3D handlers.
virtual void addParametersToEffect(Qt3DRender::QEffect *effect, const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &materialContext) const =0
Adds parameters from the material settings to a destination effect.
virtual bool updatePreviewScene(Qt3DCore::QEntity *sceneRoot, const QgsAbstractMaterialSettings *settings, const QgsMaterialContext &context) const =0
Updates an existing material preview scene with new material settings.
virtual QgsMaterial * toMaterial(const QgsAbstractMaterialSettings *settings, Qgis::MaterialRenderingTechnique technique, const QgsMaterialContext &context) const =0
Creates a new QgsMaterial object representing the material settings.
virtual QMap< QString, QString > toExportParameters(const QgsAbstractMaterialSettings *settings) const =0
Returns the parameters to be exported to .mtl file.
Abstract base class for material settings.
Context settings for a material.
Base class for all materials used within QGIS 3D views.
Definition qgsmaterial.h:40
A PBR metal rough shading material used for rendering with support for image texture maps.
#define SIP_FACTORY
Definition qgis_sip.h:83