QGIS API Documentation 4.1.0-Master (376402f9aeb)
Loading...
Searching...
No Matches
QgsMetalRoughMaterialSettings Class Reference

A PBR metal rough shading material used for rendering. More...

#include <qgsmetalroughmaterialsettings.h>

Inheritance diagram for QgsMetalRoughMaterialSettings:

Public Member Functions

 QgsMetalRoughMaterialSettings ()=default
QColor baseColor () const
 Returns the base material color.
QgsMetalRoughMaterialSettingsclone () const override
 Clones the material settings.
bool equals (const QgsAbstractMaterialSettings *other) const override
 Returns true if this settings exactly matches an other settings.
double metalness () const
 Returns the material's metalness, as a value between 0 and 1.
bool operator== (const QgsMetalRoughMaterialSettings &other) const
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 Reads settings from a DOM element.
double roughness () const
 Returns the material's roughness, as a value between 0 and 1.
void setBaseColor (const QColor &color)
 Sets the base material color.
void setMetalness (double metalness)
 Sets the material's metalness, as a value between 0 and 1.
void setRoughness (double roughness)
 Sets the material's roughness, as a value between 0 and 1.
QString type () const override
 Returns the unique type name for the material.
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const override
 Writes settings to a DOM element.
Public Member Functions inherited from QgsAbstractMaterialSettings
virtual ~QgsAbstractMaterialSettings ()=default
QgsPropertyCollection dataDefinedProperties () const
 Returns the symbol material property collection, used for data defined overrides.
const QgsPropertiesDefinitionpropertyDefinitions () const
 Returns a reference to the material properties definition, used for data defined overrides.
virtual bool requiresTangents () const
 Returns true if the material requires tangents generated during triangulation.
virtual bool requiresTextureCoordinates () const
 Returns true if the material requires texture coordinates to be generated during triangulation.
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the material property collection, used for data defined overrides.

Static Public Member Functions

static QgsAbstractMaterialSettingscreate ()
 Returns a new instance of QgsMetalRoughMaterialSettings.
static bool supportsTechnique (Qgis::MaterialRenderingTechnique technique)
 Returns true if the specified technique is supported by the metal rough material.

Additional Inherited Members

Public Types inherited from QgsAbstractMaterialSettings
enum class  Property : int {
  Diffuse , Ambient , Warm , Cool ,
  Specular
}
 Data definable properties. More...

Detailed Description

A PBR metal rough shading material used for rendering.

Warning
This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.
Since
QGIS 3.36

Definition at line 35 of file qgsmetalroughmaterialsettings.h.

Constructor & Destructor Documentation

◆ QgsMetalRoughMaterialSettings()

QgsMetalRoughMaterialSettings::QgsMetalRoughMaterialSettings ( )
default

Member Function Documentation

◆ baseColor()

QColor QgsMetalRoughMaterialSettings::baseColor ( ) const
inline

Returns the base material color.

See also
setBaseColor()

Definition at line 60 of file qgsmetalroughmaterialsettings.h.

◆ clone()

QgsMetalRoughMaterialSettings * QgsMetalRoughMaterialSettings::clone ( ) const
overridevirtual

Clones the material settings.

Caller takes ownership of the returned object.

Implements QgsAbstractMaterialSettings.

Definition at line 53 of file qgsmetalroughmaterialsettings.cpp.

◆ create()

QgsAbstractMaterialSettings * QgsMetalRoughMaterialSettings::create ( )
static

Returns a new instance of QgsMetalRoughMaterialSettings.

Definition at line 48 of file qgsmetalroughmaterialsettings.cpp.

◆ equals()

bool QgsMetalRoughMaterialSettings::equals ( const QgsAbstractMaterialSettings * other) const
overridevirtual

Returns true if this settings exactly matches an other settings.

Since
QGIS 3.42

Implements QgsAbstractMaterialSettings.

Definition at line 58 of file qgsmetalroughmaterialsettings.cpp.

◆ metalness()

double QgsMetalRoughMaterialSettings::metalness ( ) const
inline

Returns the material's metalness, as a value between 0 and 1.

See also
setMetalness()

Definition at line 67 of file qgsmetalroughmaterialsettings.h.

◆ operator==()

bool QgsMetalRoughMaterialSettings::operator== ( const QgsMetalRoughMaterialSettings & other) const
inline

Definition at line 100 of file qgsmetalroughmaterialsettings.h.

◆ readXml()

void QgsMetalRoughMaterialSettings::readXml ( const QDomElement & element,
const QgsReadWriteContext &  )
overridevirtual

Reads settings from a DOM element.

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 67 of file qgsmetalroughmaterialsettings.cpp.

◆ roughness()

double QgsMetalRoughMaterialSettings::roughness ( ) const
inline

Returns the material's roughness, as a value between 0 and 1.

See also
setRoughness()

Definition at line 74 of file qgsmetalroughmaterialsettings.h.

◆ setBaseColor()

void QgsMetalRoughMaterialSettings::setBaseColor ( const QColor & color)
inline

Sets the base material color.

See also
baseColor()

Definition at line 81 of file qgsmetalroughmaterialsettings.h.

◆ setMetalness()

void QgsMetalRoughMaterialSettings::setMetalness ( double metalness)
inline

Sets the material's metalness, as a value between 0 and 1.

See also
metalness()

Definition at line 88 of file qgsmetalroughmaterialsettings.h.

◆ setRoughness()

void QgsMetalRoughMaterialSettings::setRoughness ( double roughness)
inline

Sets the material's roughness, as a value between 0 and 1.

See also
roughness()

Definition at line 95 of file qgsmetalroughmaterialsettings.h.

◆ supportsTechnique()

bool QgsMetalRoughMaterialSettings::supportsTechnique ( Qgis::MaterialRenderingTechnique technique)
static

Returns true if the specified technique is supported by the metal rough material.

Definition at line 29 of file qgsmetalroughmaterialsettings.cpp.

◆ type()

QString QgsMetalRoughMaterialSettings::type ( ) const
overridevirtual

Returns the unique type name for the material.

Implements QgsAbstractMaterialSettings.

Definition at line 24 of file qgsmetalroughmaterialsettings.cpp.

◆ writeXml()

void QgsMetalRoughMaterialSettings::writeXml ( QDomElement & element,
const QgsReadWriteContext &  ) const
overridevirtual

Writes settings to a DOM element.

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 76 of file qgsmetalroughmaterialsettings.cpp.


The documentation for this class was generated from the following files: