Class: QgsGoochMaterialSettings

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.

Added in version 3.16.

Class Hierarchy

Inheritance diagram of qgis._3d.QgsGoochMaterialSettings

Base classes

QgsAbstractMaterialSettings

Abstract base class for material settings.

Methods

alpha

Returns the alpha value

beta

Returns the beta value

cool

Returns cool color component

diffuse

Returns diffuse color component

setAlpha

Sets alpha value

setBeta

Sets beta value

setCool

Sets cool color component

setDiffuse

Sets diffuse color component

setShininess

Sets shininess of the surface

setSpecular

Sets specular color component

setWarm

Sets warm color component

shininess

Returns shininess of the surface

specular

Returns specular color component

warm

Returns warm color component

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsGoochMaterialSettings. See the FAQ for more details.

toExportParameters

Static Methods

create

Returns a new instance of QgsGoochMaterialSettings.

supportsTechnique

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

class qgis._3d.QgsGoochMaterialSettings[source]

Bases: QgsAbstractMaterialSettings

alpha(self) float[source]

Returns the alpha value

Return type:

float

beta(self) float[source]

Returns the beta value

Return type:

float

cool(self) QColor[source]

Returns cool color component

Return type:

QColor

static create() QgsAbstractMaterialSettings | None[source]

Returns a new instance of QgsGoochMaterialSettings.

Return type:

Optional[QgsAbstractMaterialSettings]

diffuse(self) QColor[source]

Returns diffuse color component

Return type:

QColor

setAlpha(self, alpha: float)[source]

Sets alpha value

Parameters:

alpha (float)

setBeta(self, beta: float)[source]

Sets beta value

Parameters:

beta (float)

setCool(self, cool: QColor | Qt.GlobalColor)[source]

Sets cool color component

Parameters:

cool (Union[QColor, Qt.GlobalColor])

setDiffuse(self, diffuse: QColor | Qt.GlobalColor)[source]

Sets diffuse color component

Parameters:

diffuse (Union[QColor, Qt.GlobalColor])

setShininess(self, shininess: float)[source]

Sets shininess of the surface

Parameters:

shininess (float)

setSpecular(self, specular: QColor | Qt.GlobalColor)[source]

Sets specular color component

Parameters:

specular (Union[QColor, Qt.GlobalColor])

setWarm(self, warm: QColor | Qt.GlobalColor)[source]

Sets warm color component

Parameters:

warm (Union[QColor, Qt.GlobalColor])

shininess(self) float[source]

Returns shininess of the surface

Return type:

float

specular(self) QColor[source]

Returns specular color component

Return type:

QColor

static supportsTechnique(technique: QgsMaterialSettingsRenderingTechnique) bool[source]

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

Parameters:

technique (QgsMaterialSettingsRenderingTechnique)

Return type:

bool

virtual toExportParameters(self) Dict[str, str]
Return type:

Dict[str, str]

warm(self) QColor[source]

Returns warm color component

Return type:

QColor