Class: QgsGoochMaterialSettings¶
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.
Added in version 3.16.
Class Hierarchy¶
Base classes¶
Abstract base class for material settings. |
Methods
Returns the alpha value |
|
Returns the beta value |
|
Returns cool color component |
|
Returns diffuse color component |
|
Sets alpha value |
|
Sets beta value |
|
Sets cool color component |
|
Sets diffuse color component |
|
Sets shininess of the surface |
|
Sets specular color component |
|
Sets warm color component |
|
Returns shininess of the surface |
|
Returns specular color component |
|
Returns warm color component |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsGoochMaterialSettings. See the FAQ for more details.
Static Methods
Returns a new instance of QgsGoochMaterialSettings. |
|
Returns |
- class qgis._3d.QgsGoochMaterialSettings[source]¶
Bases:
QgsAbstractMaterialSettings
- static create() QgsAbstractMaterialSettings | None [source]¶
Returns a new instance of QgsGoochMaterialSettings.
- Return type:
Optional[QgsAbstractMaterialSettings]
- setCool(self, cool: QColor | Qt.GlobalColor)[source]¶
Sets cool color component
- Parameters:
cool (Union[QColor, Qt.GlobalColor])
- setDiffuse(self, diffuse: QColor | Qt.GlobalColor)[source]¶
Sets diffuse color component
- Parameters:
diffuse (Union[QColor, Qt.GlobalColor])
- 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])
- setWarm(self, warm: QColor | Qt.GlobalColor)[source]¶
Sets warm color component
- Parameters:
warm (Union[QColor, Qt.GlobalColor])
- static supportsTechnique(technique: QgsMaterialSettingsRenderingTechnique) bool [source]¶
Returns
True
if the specifiedtechnique
is supported by the Gooch material.- Parameters:
technique (QgsMaterialSettingsRenderingTechnique)
- Return type:
bool
- virtual toExportParameters(self) Dict[str, str] ¶
- Return type:
Dict[str, str]