QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 #include <QMap>
18 
19 
21 {
22  return QStringLiteral( "null" );
23 }
24 
26 {
27  switch ( technique )
28  {
30  return true;
31 
38  return false;
39  }
40  return false;
41 }
42 
44 {
45  return new QgsNullMaterialSettings();
46 }
47 
49 {
50  return new QgsNullMaterialSettings( *this );
51 }
52 
54 {
55  return nullptr;
56 }
57 
58 QMap<QString, QString> QgsNullMaterialSettings::toExportParameters() const
59 {
60  QMap<QString, QString> parameters;
61  return parameters;
62 }
63 
64 void QgsNullMaterialSettings::addParametersToEffect( Qt3DRender::QEffect * ) const
65 {
66 }
QgsNullMaterialSettings::create
static QgsAbstractMaterialSettings * create()
Returns a new instance of QgsNullMaterialSettings.
Definition: qgsnullmaterialsettings.cpp:43
QgsNullMaterialSettings::toExportParameters
QMap< QString, QString > toExportParameters() const override
Returns the parameters to be exported to .mtl file.
Definition: qgsnullmaterialsettings.cpp:58
QgsMaterialSettingsRenderingTechnique::InstancedPoints
@ InstancedPoints
Instanced based rendering, requiring triangles and point data.
QgsNullMaterialSettings
Null shading material used for rendering models and scenes with native textures.
Definition: qgsnullmaterialsettings.h:36
QgsMaterialContext
Context settings for a material.
Definition: qgsabstractmaterialsettings.h:64
QgsNullMaterialSettings::addParametersToEffect
void addParametersToEffect(Qt3DRender::QEffect *effect) const override
Adds parameters from the material to a destination effect.
Definition: qgsnullmaterialsettings.cpp:64
qgsnullmaterialsettings.h
QgsAbstractMaterialSettings
Abstract base class for material settings.
Definition: qgsabstractmaterialsettings.h:114
QgsMaterialSettingsRenderingTechnique::Lines
@ Lines
Line based rendering, requires line data.
QgsNullMaterialSettings::toMaterial
Qt3DRender::QMaterial * toMaterial(QgsMaterialSettingsRenderingTechnique technique, const QgsMaterialContext &context) const override
Creates a new QMaterial object representing the material settings.
Definition: qgsnullmaterialsettings.cpp:53
QgsMaterialSettingsRenderingTechnique::Triangles
@ Triangles
Triangle based rendering (default)
QgsMaterialSettingsRenderingTechnique::TrianglesWithFixedTexture
@ TrianglesWithFixedTexture
Triangle based rendering, using a fixed, non-user-configurable texture (e.g. for terrain rendering)
QgsMaterialSettingsRenderingTechnique
QgsMaterialSettingsRenderingTechnique
Material rendering techniques.
Definition: qgsabstractmaterialsettings.h:43
QgsNullMaterialSettings::supportsTechnique
static bool supportsTechnique(QgsMaterialSettingsRenderingTechnique technique)
Returns true if the specified technique is supported by the material.
Definition: qgsnullmaterialsettings.cpp:25
QgsMaterialSettingsRenderingTechnique::TrianglesDataDefined
@ TrianglesDataDefined
Triangle based rendering with possibility of datadefined color.
QgsMaterialSettingsRenderingTechnique::TrianglesFromModel
@ TrianglesFromModel
Triangle based rendering, using a model object source.
QgsNullMaterialSettings::type
QString type() const override
Returns the unique type name for the material.
Definition: qgsnullmaterialsettings.cpp:20
QgsNullMaterialSettings::QgsNullMaterialSettings
QgsNullMaterialSettings()=default
Constructor for QgsNullMaterialSettings.
QgsNullMaterialSettings::clone
QgsNullMaterialSettings * clone() const override
Clones the material settings.
Definition: qgsnullmaterialsettings.cpp:48
QgsMaterialSettingsRenderingTechnique::Points
@ Points
Point based rendering, requires point data.