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.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Abstract base class for material settings. |
Methods
Returns ambient color component |
|
Returns the diffuse texture path. |
|
Returns the opacity of the surface |
|
Sets ambient color component |
|
Sets the path of the diffuse texture. |
|
Sets opacity of the surface. |
|
Sets shininess of the surface |
|
Sets specular color component |
|
Sets the texture rotation in degrees |
|
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 |
|
Returns shininess of the surface |
|
Returns specular color component |
|
Returns the texture rotation, in degrees. |
|
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 |
Static Methods
Returns a new instance of QgsPhongTexturedMaterialSettings. |
|
Returns |
- class qgis._3d.QgsPhongTexturedMaterialSettings¶
Bases:
QgsAbstractMaterialSettings- ambient(self) QColor¶
Returns ambient color component
- Return type:
QColor
- static create() QgsAbstractMaterialSettings | None¶
Returns a new instance of QgsPhongTexturedMaterialSettings.
- Return type:
- diffuseTexturePath(self) str¶
Returns the diffuse texture path.
See also
- Return type:
str
- opacity(self) float¶
Returns the opacity of the surface
Added in version 3.28.
- Return type:
float
- setAmbient(self, ambient: QColor | Qt.GlobalColor | int)¶
Sets ambient color component
- Parameters:
ambient (Union[QColor, Qt.GlobalColor, int])
- setDiffuseTexturePath(self, path: str | None)¶
Sets the
pathof the diffuse texture.See also
- Parameters:
path (Optional[str])
- setOpacity(self, opacity: float)¶
Sets opacity of the surface.
Added 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 | int)¶
Sets specular color component
- Parameters:
specular (Union[QColor, Qt.GlobalColor, int])
- 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
- static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool¶
Returns
Trueif the specifiedtechniqueis supported by the Phong material.- Parameters:
technique (Qgis.MaterialRenderingTechnique)
- 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