Class: QgsPhongTexturedMaterialSettings¶
- class qgis.3d.QgsPhongTexturedMaterialSettings¶
Bases:
qgis._3d.QgsAbstractMaterialSettings
Constructor for QgsPhongTexturedMaterialSettings.
QgsPhongTexturedMaterialSettings(
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.
Methods
Returns ambient color component
- rtype
QgsPhongTexturedMaterialSettings
Returns a new instance of QgsPhongTexturedMaterialSettings.
Returns the diffuse texture path.
- param elem
Returns
True
if the material requires texture coordinates to be generated during triangulation.quiresTextureCoordinatesSets ambient color component
Sets the
path
of the diffuse texture.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
True
if the specifiedtechnique
is supported by the Phong material.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
- rtype
Dict[str, str]
- rtype
str
- param elem
- ambient(self) → QColor¶
Returns ambient color component
- Return type
QColor
- clone(self) → QgsPhongTexturedMaterialSettings¶
- Return type
- create() → QgsAbstractMaterialSettings¶
Returns a new instance of QgsPhongTexturedMaterialSettings.
- Return type
- diffuseTexturePath(self) → str¶
Returns the diffuse texture path.
See also
- Return type
str
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –
- requiresTextureCoordinates(self) → bool¶
Returns
True
if the material requires texture coordinates to be generated during triangulation.quiresTextureCoordinates- Return type
bool
- setAmbient(self, ambient: Union[QColor, Qt.GlobalColor])¶
Sets ambient color component
- Parameters
ambient (Union[QColor) –
- setDiffuseTexturePath(self, path: str)¶
Sets the
path
of the diffuse texture.See also
- Parameters
path (str) –
- 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) –
- 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 specifiedtechnique
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
elem (QDomElement) –
context (QgsReadWriteContext) –