QGIS API Documentation 3.99.0-Master (d270888f95f)
Loading...
Searching...
No Matches
qgsnullmaterialsettings.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsnullmaterialsettings.cpp
3 --------------------------------------
4 Date : November 2020
5 Copyright : (C) 2020 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
17
18#include "qgsmaterial.h"
19
20#include <QMap>
21#include <QString>
22
23using namespace Qt::StringLiterals;
24
26{
27 return u"null"_s;
28}
29
47
52
57
59{
60 const QgsNullMaterialSettings *otherNull = dynamic_cast<const QgsNullMaterialSettings *>( other );
61 if ( !otherNull )
62 return false;
63
64 return true;
65}
66
71
72QMap<QString, QString> QgsNullMaterialSettings::toExportParameters() const
73{
74 QMap<QString, QString> parameters;
75 return parameters;
76}
77
78void QgsNullMaterialSettings::addParametersToEffect( Qt3DRender::QEffect *, const QgsMaterialContext & ) const
79{
80}
Abstract base class for material settings.
Context settings for a material.
Base class for all materials used within QGIS 3D views.
Definition qgsmaterial.h:39
QMap< QString, QString > toExportParameters() const override
Returns the parameters to be exported to .mtl file.
void addParametersToEffect(Qt3DRender::QEffect *effect, const QgsMaterialContext &materialContext) const override
Adds parameters from the material to a destination effect.
QgsMaterial * toMaterial(QgsMaterialSettingsRenderingTechnique technique, const QgsMaterialContext &context) const override
Creates a new QgsMaterial object representing the material settings.
static QgsAbstractMaterialSettings * create()
Returns a new instance of QgsNullMaterialSettings.
QgsNullMaterialSettings()=default
bool equals(const QgsAbstractMaterialSettings *other) const override
Returns true if this settings exactly matches an other settings.
static bool supportsTechnique(QgsMaterialSettingsRenderingTechnique technique)
Returns true if the specified technique is supported by the material.
QgsNullMaterialSettings * clone() const override
Clones the material settings.
QString type() const override
Returns the unique type name for the material.
QgsMaterialSettingsRenderingTechnique
Material rendering techniques.
@ Points
Point based rendering, requires point data.
@ Triangles
Triangle based rendering (default).
@ TrianglesFromModel
Triangle based rendering, using a model object source.
@ Lines
Line based rendering, requires line data.
@ TrianglesDataDefined
Triangle based rendering with possibility of datadefined color.
@ InstancedPoints
Instanced based rendering, requiring triangles and point data.
@ TrianglesWithFixedTexture
Triangle based rendering, using a fixed, non-user-configurable texture (e.g. for terrain rendering).