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 );
48 material->setMetalness(
static_cast< float >( std::clamp( metalRoughSettings->
metalness(), 0.0, 1.0 ) ) );
49 material->setRoughness(
static_cast< float >( std::clamp( metalRoughSettings->
roughness(), 0.0, 1.0 ) ) );
64 QMap<QString, QString> parameters;
75 QgsMetalRoughMaterial *material = sceneRoot->findChild<QgsMetalRoughMaterial *>();
76 if ( material->objectName() !=
"metalRoughMaterial"_L1 )
79 material->setBaseColor( metalRoughSettings->
baseColor() );
80 material->setMetalness(
static_cast< float >( metalRoughSettings->
metalness() ) );
81 material->setRoughness(
static_cast< float >( metalRoughSettings->
roughness() ) );
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.