23#include <Qt3DCore/QEntity>
24#include <Qt3DRender/QParameter>
26using namespace Qt::StringLiterals;
31 Q_ASSERT( metalRoughSettings );
42 return new QgsHighlightMaterial( technique );
45 QgsMetalRoughMaterial *material =
new QgsMetalRoughMaterial;
46 material->setObjectName( u
"metalRoughMaterial"_s );
47 applySettingsToMaterial( metalRoughSettings, material, context );
62 QMap<QString, QString> parameters;
73 QgsMetalRoughMaterial *material = sceneRoot->findChild<QgsMetalRoughMaterial *>();
74 if ( material->objectName() !=
"metalRoughMaterial"_L1 )
77 applySettingsToMaterial( metalRoughSettings, material, context );
84 material->setMetalness(
static_cast< float >( metalRoughSettings->
metalness() ) );
85 material->setRoughness(
static_cast< float >( metalRoughSettings->
roughness() ) );
86 material->setOpacity(
static_cast< float >( metalRoughSettings->
opacity() ) );
MaterialRenderingTechnique
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.
@ Billboards
Flat billboard rendering.
@ 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).
Abstract base class for material settings.
Context settings for a material.
QColor selectionColor() const
Returns the color for representing materials in a selected state.
bool isSelected() const
Returns true if the material should represent a selected state.
bool isHighlighted() const
Returns true if the material should represent a highlighted state.
Base class for all materials used within QGIS 3D views.