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

Basic shading material used for rendering based on the Phong shading model with three color components: ambient, diffuse and specular. More...

#include <qgsgoochmaterialsettings.h>

Inheritance diagram for QgsGoochMaterialSettings:

Public Member Functions

 QgsGoochMaterialSettings ()=default
double alpha () const
 Returns the alpha value.
double beta () const
 Returns the beta value.
QgsGoochMaterialSettingsclone () const override
 Clones the material settings.
QColor cool () const
 Returns cool color component.
QColor diffuse () const
 Returns diffuse color component.
bool equals (const QgsAbstractMaterialSettings *other) const override
 Returns true if this settings exactly matches an other settings.
bool operator== (const QgsGoochMaterialSettings &other) const
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 Reads settings from a DOM element.
void setAlpha (double alpha)
 Sets alpha value.
void setBeta (double beta)
 Sets beta value.
void setCool (const QColor &cool)
 Sets cool color component.
void setDiffuse (const QColor &diffuse)
 Sets diffuse color component.
void setShininess (double shininess)
 Sets shininess of the surface.
void setSpecular (const QColor &specular)
 Sets specular color component.
void setWarm (const QColor &warm)
 Sets warm color component.
double shininess () const
 Returns shininess of the surface.
QColor specular () const
 Returns specular color component.
QString type () const override
 Returns the unique type name for the material.
QColor warm () const
 Returns warm color component.
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 QgsGoochMaterialSettings.
static bool supportsTechnique (Qgis::MaterialRenderingTechnique technique)
 Returns true if the specified technique is supported by the Gooch material.

Additional Inherited Members

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

Detailed Description

Basic shading material used for rendering based on the Phong shading model with three color components: ambient, diffuse and specular.

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.16

Definition at line 37 of file qgsgoochmaterialsettings.h.

Constructor & Destructor Documentation

◆ QgsGoochMaterialSettings()

QgsGoochMaterialSettings::QgsGoochMaterialSettings ( )
default

Member Function Documentation

◆ alpha()

double QgsGoochMaterialSettings::alpha ( ) const
inline

Returns the alpha value.

Definition at line 71 of file qgsgoochmaterialsettings.h.

◆ beta()

double QgsGoochMaterialSettings::beta ( ) const
inline

Returns the beta value.

Definition at line 74 of file qgsgoochmaterialsettings.h.

◆ clone()

QgsGoochMaterialSettings * QgsGoochMaterialSettings::clone ( ) const
overridevirtual

Clones the material settings.

Caller takes ownership of the returned object.

Implements QgsAbstractMaterialSettings.

Definition at line 54 of file qgsgoochmaterialsettings.cpp.

◆ cool()

QColor QgsGoochMaterialSettings::cool ( ) const
inline

Returns cool color component.

Definition at line 61 of file qgsgoochmaterialsettings.h.

◆ create()

QgsAbstractMaterialSettings * QgsGoochMaterialSettings::create ( )
static

Returns a new instance of QgsGoochMaterialSettings.

Definition at line 30 of file qgsgoochmaterialsettings.cpp.

◆ diffuse()

QColor QgsGoochMaterialSettings::diffuse ( ) const
inline

Returns diffuse color component.

Definition at line 64 of file qgsgoochmaterialsettings.h.

◆ equals()

bool QgsGoochMaterialSettings::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 59 of file qgsgoochmaterialsettings.cpp.

◆ operator==()

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

Definition at line 98 of file qgsgoochmaterialsettings.h.

◆ readXml()

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

Reads settings from a DOM element.

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 68 of file qgsgoochmaterialsettings.cpp.

◆ setAlpha()

void QgsGoochMaterialSettings::setAlpha ( double alpha)
inline

Sets alpha value.

Definition at line 90 of file qgsgoochmaterialsettings.h.

◆ setBeta()

void QgsGoochMaterialSettings::setBeta ( double beta)
inline

Sets beta value.

Definition at line 93 of file qgsgoochmaterialsettings.h.

◆ setCool()

void QgsGoochMaterialSettings::setCool ( const QColor & cool)
inline

Sets cool color component.

Definition at line 80 of file qgsgoochmaterialsettings.h.

◆ setDiffuse()

void QgsGoochMaterialSettings::setDiffuse ( const QColor & diffuse)
inline

Sets diffuse color component.

Definition at line 83 of file qgsgoochmaterialsettings.h.

◆ setShininess()

void QgsGoochMaterialSettings::setShininess ( double shininess)
inline

Sets shininess of the surface.

Definition at line 87 of file qgsgoochmaterialsettings.h.

◆ setSpecular()

void QgsGoochMaterialSettings::setSpecular ( const QColor & specular)
inline

Sets specular color component.

Definition at line 85 of file qgsgoochmaterialsettings.h.

◆ setWarm()

void QgsGoochMaterialSettings::setWarm ( const QColor & warm)
inline

Sets warm color component.

Definition at line 77 of file qgsgoochmaterialsettings.h.

◆ shininess()

double QgsGoochMaterialSettings::shininess ( ) const
inline

Returns shininess of the surface.

Definition at line 68 of file qgsgoochmaterialsettings.h.

◆ specular()

QColor QgsGoochMaterialSettings::specular ( ) const
inline

Returns specular color component.

Definition at line 66 of file qgsgoochmaterialsettings.h.

◆ supportsTechnique()

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

Returns true if the specified technique is supported by the Gooch material.

Definition at line 35 of file qgsgoochmaterialsettings.cpp.

◆ type()

QString QgsGoochMaterialSettings::type ( ) const
overridevirtual

Returns the unique type name for the material.

Implements QgsAbstractMaterialSettings.

Definition at line 25 of file qgsgoochmaterialsettings.cpp.

◆ warm()

QColor QgsGoochMaterialSettings::warm ( ) const
inline

Returns warm color component.

Definition at line 58 of file qgsgoochmaterialsettings.h.

◆ writeXml()

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

Writes settings to a DOM element.

Reimplemented from QgsAbstractMaterialSettings.

Definition at line 81 of file qgsgoochmaterialsettings.cpp.


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