Class: QgsPhongMaterialSettings

class qgis.3d.QgsPhongMaterialSettings

Bases: sip.wrapper

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.

Methods

ambient

Returns ambient color component

diffuse

Returns diffuse color component

readXml

Reads settings from a DOM element

setAmbient

Sets ambient color component

setDiffuse

Sets diffuse color component

setShininess

Sets shininess of the surface

setSpecular

Sets specular color component

shininess

Returns shininess of the surface

specular

Returns specular color component

writeXml

Writes settings to a DOM element

ambient(self) → QColor

Returns ambient color component

Return type

QColor

diffuse(self) → QColor

Returns diffuse color component

Return type

QColor

readXml(self, elem: QDomElement)

Reads settings from a DOM element

Parameters

elem (QDomElement) –

setAmbient(self, ambient: Union[QColor, Qt.GlobalColor])

Sets ambient color component

Parameters

ambient (Union[QColor) –

setDiffuse(self, diffuse: Union[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: Union[QColor, Qt.GlobalColor])

Sets specular color component

Parameters

specular (Union[QColor) –

shininess(self) → float

Returns shininess of the surface

Return type

float

specular(self) → QColor

Returns specular color component

Return type

QColor

writeXml(self, elem: QDomElement)

Writes settings to a DOM element

Parameters

elem (QDomElement) –