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

A PBR metal rough shading material used for rendering with support for image texture maps. More...

#include <qgsmetalroughtexturedmaterialsettings.h>

Inheritance diagram for QgsMetalRoughTexturedMaterialSettings:

Public Member Functions

 QgsMetalRoughTexturedMaterialSettings ()=default
QString ambientOcclusionTexturePath () const
 Returns the path to the ambient occlusion texture map.
QString baseColorTexturePath () const
 Returns the path to the base color texture map.
QgsMetalRoughTexturedMaterialSettingsclone () const override
 Clones the material settings.
double emissionFactor () const
 Returns the emission factor, which dictates the strength of the emission effect.
QString emissionTexturePath () const
 Returns the path to the emission/luminosity texture map.
bool equals (const QgsAbstractMaterialSettings *other) const override
 Returns true if this settings exactly matches an other settings.
QString heightTexturePath () const
 Returns the path to the height texture map.
QString metalnessTexturePath () const
 Returns the path to the metalness texture map.
QString normalTexturePath () const
 Returns the path to the normal texture map.
bool operator== (const QgsMetalRoughTexturedMaterialSettings &other) const
double parallaxScale () const
 Returns the parallax scale, which dictates the strength of the height displacement effect.
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 Reads settings from a DOM element.
bool requiresTangents () const override
 Returns true if the material requires tangents generated during triangulation.
bool requiresTextureCoordinates () const override
 Returns true if the material requires texture coordinates to be generated during triangulation.
QString roughnessTexturePath () const
 Returns the path to the roughness texture map.
void setAmbientOcclusionTexturePath (const QString &path)
 Sets the path to the ambient occlusion texture map.
void setBaseColorTexturePath (const QString &path)
 Sets the path to the base color texture map.
void setEmissionFactor (double factor)
 Sets the emission factor, which dictates the strength of the emission effect.
void setEmissionTexturePath (const QString &path)
 Sets the path to the emission/luminosity texture map.
void setHeightTexturePath (const QString &path)
 Sets the path to the height texture map.
void setMetalnessTexturePath (const QString &path)
 Sets the path to the metalness texture map.
void setNormalTexturePath (const QString &path)
 Sets the path to the normal texture map.
void setParallaxScale (double scale)
 Sets the parallax scale, which dictates the strength of the height displacement effect.
void setRoughnessTexturePath (const QString &path)
 Sets the path to the roughness texture map.
void setTextureRotation (double rotation)
 Sets the texture rotation, in degrees.
void setTextureScale (double scale)
 Sets the texture scale.
double textureRotation () const
 Returns the texture rotation, in degrees.
double textureScale () const
 Returns the texture scale.
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.
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 QgsMetalRoughTexturedMaterialSettings.
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 with support for image texture maps.

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 4.2

Definition at line 35 of file qgsmetalroughtexturedmaterialsettings.h.

Constructor & Destructor Documentation

◆ QgsMetalRoughTexturedMaterialSettings()

QgsMetalRoughTexturedMaterialSettings::QgsMetalRoughTexturedMaterialSettings ( )
default

Member Function Documentation

◆ ambientOcclusionTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::ambientOcclusionTexturePath ( ) const
inline

Returns the path to the ambient occlusion texture map.

See also
setAmbientOcclusionTexturePath()

Definition at line 122 of file qgsmetalroughtexturedmaterialsettings.h.

◆ baseColorTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::baseColorTexturePath ( ) const
inline

Returns the path to the base color texture map.

See also
setBaseColorTexturePath()

Definition at line 60 of file qgsmetalroughtexturedmaterialsettings.h.

◆ clone()

QgsMetalRoughTexturedMaterialSettings * QgsMetalRoughTexturedMaterialSettings::clone ( ) const
overridevirtual

Clones the material settings.

Caller takes ownership of the returned object.

Implements QgsAbstractMaterialSettings.

Definition at line 53 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ create()

QgsAbstractMaterialSettings * QgsMetalRoughTexturedMaterialSettings::create ( )
static

Returns a new instance of QgsMetalRoughTexturedMaterialSettings.

Definition at line 48 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ emissionFactor()

double QgsMetalRoughTexturedMaterialSettings::emissionFactor ( ) const
inline

Returns the emission factor, which dictates the strength of the emission effect.

A value of 1.0 indicates that the emission texture values should be used directly. Larger values result in more light emission.

See also
setEmissionFactor()
emissionTexturePath()

Definition at line 115 of file qgsmetalroughtexturedmaterialsettings.h.

◆ emissionTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::emissionTexturePath ( ) const
inline

Returns the path to the emission/luminosity texture map.

See also
emissionFactor()
setEmissionTexturePath()

Definition at line 104 of file qgsmetalroughtexturedmaterialsettings.h.

◆ equals()

bool QgsMetalRoughTexturedMaterialSettings::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 qgsmetalroughtexturedmaterialsettings.cpp.

◆ heightTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::heightTexturePath ( ) const
inline

Returns the path to the height texture map.

See also
setHeightTexturePath()

Definition at line 88 of file qgsmetalroughtexturedmaterialsettings.h.

◆ metalnessTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::metalnessTexturePath ( ) const
inline

Returns the path to the metalness texture map.

See also
setMetalnessTexturePath()

Definition at line 67 of file qgsmetalroughtexturedmaterialsettings.h.

◆ normalTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::normalTexturePath ( ) const
inline

Returns the path to the normal texture map.

See also
setNormalTexturePath()

Definition at line 81 of file qgsmetalroughtexturedmaterialsettings.h.

◆ operator==()

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

Definition at line 232 of file qgsmetalroughtexturedmaterialsettings.h.

◆ parallaxScale()

double QgsMetalRoughTexturedMaterialSettings::parallaxScale ( ) const
inline

Returns the parallax scale, which dictates the strength of the height displacement effect.

See also
setParallaxScale()
heightTexturePath()

Definition at line 96 of file qgsmetalroughtexturedmaterialsettings.h.

◆ readXml()

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

Reads settings from a DOM element.

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 77 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ requiresTangents()

bool QgsMetalRoughTexturedMaterialSettings::requiresTangents ( ) const
overridevirtual

Returns true if the material requires tangents generated during triangulation.

Since
QGIS 4.2

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 72 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ requiresTextureCoordinates()

bool QgsMetalRoughTexturedMaterialSettings::requiresTextureCoordinates ( ) const
overridevirtual

Returns true if the material requires texture coordinates to be generated during triangulation.

Since
QGIS 4.2

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 67 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ roughnessTexturePath()

QString QgsMetalRoughTexturedMaterialSettings::roughnessTexturePath ( ) const
inline

Returns the path to the roughness texture map.

See also
setRoughnessTexturePath()

Definition at line 74 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setAmbientOcclusionTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setAmbientOcclusionTexturePath ( const QString & path)
inline

Sets the path to the ambient occlusion texture map.

See also
ambientOcclusionTexturePath()

Definition at line 189 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setBaseColorTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setBaseColorTexturePath ( const QString & path)
inline

Sets the path to the base color texture map.

See also
baseColorTexturePath()

Definition at line 146 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setEmissionFactor()

void QgsMetalRoughTexturedMaterialSettings::setEmissionFactor ( double factor)
inline

Sets the emission factor, which dictates the strength of the emission effect.

A value of 1.0 indicates that the emission texture values should be used directly. Larger values result in more light emission.

See also
emissionFactor()
setEmissionTexturePath()

Definition at line 208 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setEmissionTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setEmissionTexturePath ( const QString & path)
inline

Sets the path to the emission/luminosity texture map.

See also
setEmissionFactor()
emissionTexturePath()

Definition at line 197 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setHeightTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setHeightTexturePath ( const QString & path)
inline

Sets the path to the height texture map.

See also
heightTexturePath()

Definition at line 174 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setMetalnessTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setMetalnessTexturePath ( const QString & path)
inline

Sets the path to the metalness texture map.

See also
metalnessTexturePath()

Definition at line 153 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setNormalTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setNormalTexturePath ( const QString & path)
inline

Sets the path to the normal texture map.

See also
normalTexturePath()

Definition at line 167 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setParallaxScale()

void QgsMetalRoughTexturedMaterialSettings::setParallaxScale ( double scale)
inline

Sets the parallax scale, which dictates the strength of the height displacement effect.

See also
parallaxScale()
setHeightTexturePath()

Definition at line 182 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setRoughnessTexturePath()

void QgsMetalRoughTexturedMaterialSettings::setRoughnessTexturePath ( const QString & path)
inline

Sets the path to the roughness texture map.

See also
roughnessTexturePath()

Definition at line 160 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setTextureRotation()

void QgsMetalRoughTexturedMaterialSettings::setTextureRotation ( double rotation)
inline

Sets the texture rotation, in degrees.

See also
textureRotation()

Definition at line 225 of file qgsmetalroughtexturedmaterialsettings.h.

◆ setTextureScale()

void QgsMetalRoughTexturedMaterialSettings::setTextureScale ( double scale)
inline

Sets the texture scale.

The texture scale changes the size of the displayed texture in the 3D scene. If the texture scale is less than 1, the texture will be stretched.

See also
textureScale()

Definition at line 218 of file qgsmetalroughtexturedmaterialsettings.h.

◆ supportsTechnique()

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

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

Definition at line 29 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ textureRotation()

double QgsMetalRoughTexturedMaterialSettings::textureRotation ( ) const
inline

Returns the texture rotation, in degrees.

See also
setTextureRotation()

Definition at line 139 of file qgsmetalroughtexturedmaterialsettings.h.

◆ textureScale()

double QgsMetalRoughTexturedMaterialSettings::textureScale ( ) const
inline

Returns the texture scale.

The texture scale changes the size of the displayed texture in the 3D scene. If the texture scale is less than 1, the texture will be stretched.

See also
setTextureScale()

Definition at line 132 of file qgsmetalroughtexturedmaterialsettings.h.

◆ type()

QString QgsMetalRoughTexturedMaterialSettings::type ( ) const
overridevirtual

Returns the unique type name for the material.

Implements QgsAbstractMaterialSettings.

Definition at line 24 of file qgsmetalroughtexturedmaterialsettings.cpp.

◆ writeXml()

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

Writes settings to a DOM element.

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 94 of file qgsmetalroughtexturedmaterialsettings.cpp.


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