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.
List of all members, including inherited members
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 |
Static Methods
Returns a new instance of QgsGoochMaterialSettings. |
|
Returns |
- class qgis._3d.QgsGoochMaterialSettings¶
Bases:
QgsAbstractMaterialSettings- alpha(self) float¶
Returns the alpha value
- Return type:
float
- beta(self) float¶
Returns the beta value
- Return type:
float
- cool(self) QColor¶
Returns cool color component
- Return type:
QColor
- static create() QgsAbstractMaterialSettings | None¶
Returns a new instance of QgsGoochMaterialSettings.
- Return type:
- diffuse(self) QColor¶
Returns diffuse color component
- Return type:
QColor
- setAlpha(self, alpha: float)¶
Sets alpha value
- Parameters:
alpha (float)
- setBeta(self, beta: float)¶
Sets beta value
- Parameters:
beta (float)
- setCool(self, cool: QColor | Qt.GlobalColor | int)¶
Sets cool color component
- Parameters:
cool (Union[QColor, Qt.GlobalColor, int])
- setDiffuse(self, diffuse: QColor | Qt.GlobalColor | int)¶
Sets diffuse color component
- Parameters:
diffuse (Union[QColor, Qt.GlobalColor, int])
- 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])
- setWarm(self, warm: QColor | Qt.GlobalColor | int)¶
Sets warm color component
- Parameters:
warm (Union[QColor, Qt.GlobalColor, int])
- 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 Gooch material.- Parameters:
technique (Qgis.MaterialRenderingTechnique)
- Return type:
bool
- warm(self) QColor¶
Returns warm color component
- Return type:
QColor