Class: QgsPhongTexturedMaterialSettings

class qgis._3d.QgsPhongTexturedMaterialSettings

Bases: qgis._3d.QgsAbstractMaterialSettings

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.

New in version 3.16.

QgsPhongTexturedMaterialSettings() Constructor for QgsPhongTexturedMaterialSettings.

QgsPhongTexturedMaterialSettings(QgsPhongTexturedMaterialSettings)

Methods

ambient

Returns ambient color component

clone

rtype:

QgsPhongTexturedMaterialSettings

create

Returns a new instance of QgsPhongTexturedMaterialSettings.

diffuseTexturePath

Returns the diffuse texture path.

opacity

Returns the opacity of the surface

readXml

param elem:

requiresTextureCoordinates

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

setAmbient

Sets ambient color component

setDiffuseTexturePath

Sets the path of the diffuse texture.

setOpacity

Sets opacity of the surface.

setShininess

Sets shininess of the surface

setSpecular

Sets specular color component

setTextureRotation

Sets the texture rotation in degrees

setTextureScale

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

shininess

Returns shininess of the surface

specular

Returns specular color component

supportsTechnique

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

textureRotation

Returns the texture rotation, in degrees.

textureScale

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

toExportParameters

rtype:

Dict[str, str]

type

rtype:

str

writeXml

param elem:

ambient(self) QColor

Returns ambient color component

Return type:

QColor

clone(self) QgsPhongTexturedMaterialSettings
Return type:

QgsPhongTexturedMaterialSettings

create() QgsAbstractMaterialSettings

Returns a new instance of QgsPhongTexturedMaterialSettings.

Return type:

QgsAbstractMaterialSettings

diffuseTexturePath(self) str

Returns the diffuse texture path.

Return type:

str

opacity(self) float

Returns the opacity of the surface

New in version 3.28.

Return type:

float

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters:
requiresTextureCoordinates(self) bool

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

Return type:

bool

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

Sets ambient color component

Parameters:

ambient (Union[QColor) –

setDiffuseTexturePath(self, path: str)

Sets the path of the diffuse texture.

Parameters:

path (str) –

setOpacity(self, opacity: float)

Sets opacity of the surface.

New in version 3.28.

Parameters:

opacity (float) –

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

setTextureRotation(self, rotation: float)

Sets the texture rotation in degrees

Parameters:

rotation (float) –

setTextureScale(self, scale: float)

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

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

Parameters:

technique (QgsMaterialSettingsRenderingTechnique) –

Return type:

bool

textureRotation(self) float

Returns the texture rotation, in degrees.

Return type:

float

textureScale(self) float

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

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

Dict[str, str]

type(self) str
Return type:

str

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