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.

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