Class: QgsGoochMaterialSettings

class qgis._3d.QgsGoochMaterialSettings

Bases: qgis._3d.QgsAbstractMaterialSettings

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.

New in version 3.16.

QgsGoochMaterialSettings() Constructor for QgsGoochMaterialSettings.

QgsGoochMaterialSettings(QgsGoochMaterialSettings)

Methods

alpha

Returns the alpha value

beta

Returns the beta value

clone

rtype:

QgsGoochMaterialSettings

cool

Returns cool color component

create

Returns a new instance of QgsGoochMaterialSettings.

diffuse

Returns diffuse color component

readXml

param elem:

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

supportsTechnique

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

toExportParameters

rtype:

Dict[str, str]

type

rtype:

str

warm

Returns warm color component

writeXml

param elem:

alpha(self) float

Returns the alpha value

Return type:

float

beta(self) float

Returns the beta value

Return type:

float

clone(self) QgsGoochMaterialSettings
Return type:

QgsGoochMaterialSettings

cool(self) QColor

Returns cool color component

Return type:

QColor

create() QgsAbstractMaterialSettings

Returns a new instance of QgsGoochMaterialSettings.

Return type:

QgsAbstractMaterialSettings

diffuse(self) QColor

Returns diffuse color component

Return type:

QColor

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters:
setAlpha(self, alpha: float)

Sets alpha value

Parameters:

alpha (float) –

setBeta(self, beta: float)

Sets beta value

Parameters:

beta (float) –

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

Sets cool color component

Parameters:

cool (Union[QColor) –

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

Sets diffuse color component

Parameters:

diffuse (Union[QColor) –

setShininess(self, shininess: float)

Sets shininess of the surface

Parameters:

shininess (float) –

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

Sets specular color component

Parameters:

specular (Union[QColor) –

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

Sets warm color component

Parameters:

warm (Union[QColor) –

shininess(self) float

Returns shininess of the surface

Return type:

float

specular(self) QColor

Returns specular color component

Return type:

QColor

supportsTechnique(technique: QgsMaterialSettingsRenderingTechnique) bool

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

Parameters:

technique (QgsMaterialSettingsRenderingTechnique) –

Return type:

bool

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

Dict[str, str]

type(self) str
Return type:

str

warm(self) QColor

Returns warm color component

Return type:

QColor

writeXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters: