Class: QgsPhongTexturedMaterialSettings

A Phong shading model with diffuse texture map.

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

Base classes

QgsAbstractMaterialSettings

Abstract base class for material settings.

class qgis._3d.QgsPhongTexturedMaterialSettings[source]

Bases: QgsAbstractMaterialSettings

ambient(self) QColor[source]

Returns ambient color component

Return type:

QColor

static create() QgsAbstractMaterialSettings | None[source]

Returns a new instance of QgsPhongTexturedMaterialSettings.

Return type:

Optional[QgsAbstractMaterialSettings]

diffuseTexturePath(self) str[source]

Returns the diffuse texture path.

Return type:

str

opacity(self) float[source]

Returns the opacity of the surface

Added in version 3.28.

Return type:

float

requiresTextureCoordinates(self) bool[source]

Returns True if the material requires texture coordinates to be generated during triangulation.quiresTextureCoordinates

Return type:

bool

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

Sets ambient color component

Parameters:

ambient (Union[QColor, Qt.GlobalColor])

setDiffuseTexturePath(self, path: str | None)[source]

Sets the path of the diffuse texture.

Parameters:

path (Optional[str])

setOpacity(self, opacity: float)[source]

Sets opacity of the surface.

Added in version 3.28.

Parameters:

opacity (float)

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])

setTextureRotation(self, rotation: float)[source]

Sets the texture rotation in degrees

Parameters:

rotation (float)

setTextureScale(self, scale: float)[source]

Sets the texture scale The texture scale changes the size of the displayed texture in the 3D scene If the texture scale is less than 1 the texture will be stretched

Parameters:

scale (float)

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 Phong material.

Parameters:

technique (QgsMaterialSettingsRenderingTechnique)

Return type:

bool

textureRotation(self) float[source]

Returns the texture rotation, in degrees.

Return type:

float

textureScale(self) float[source]

Returns the texture scale The texture scale changes the size of the displayed texture in the 3D scene If the texture scale is less than 1 the texture will be stretched

Return type:

float

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

Dict[str, str]