Class: QgsGoochMaterialSettings¶
- class qgis.3d.QgsGoochMaterialSettings¶
Bases:
qgis._3d.QgsAbstractMaterialSettings
Constructor for QgsGoochMaterialSettings.
QgsGoochMaterialSettings(
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.
Methods
Returns the alpha value
Returns the beta value
- rtype
QgsGoochMaterialSettings
Returns cool color component
Returns a new instance of QgsGoochMaterialSettings.
Returns diffuse color component
- param elem
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
True
if the specifiedtechnique
is supported by the Gooch material.- rtype
Dict[str, str]
- rtype
str
Returns warm color component
- param elem
- alpha(self) → float¶
Returns the alpha value
- Return type
float
- beta(self) → float¶
Returns the beta value
- Return type
float
- clone(self) → QgsGoochMaterialSettings¶
- Return type
- cool(self) → QColor¶
Returns cool color component
- Return type
QColor
- create() → QgsAbstractMaterialSettings¶
Returns a new instance of QgsGoochMaterialSettings.
- Return type
- diffuse(self) → QColor¶
Returns diffuse color component
- Return type
QColor
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –
- setAlpha(self, alpha: float)¶
Sets alpha value
- Parameters
alpha (float) –
- setBeta(self, beta: float)¶
Sets beta value
- Parameters
beta (float) –
- setCool(self, cool: Union[QColor, Qt.GlobalColor])¶
Sets cool color component
- Parameters
cool (Union[QColor) –
- setDiffuse(self, diffuse: Union[QColor, Qt.GlobalColor])¶
Sets diffuse color component
- Parameters
diffuse (Union[QColor) –
- 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) –
- setWarm(self, warm: Union[QColor, Qt.GlobalColor])¶
Sets warm color component
- Parameters
warm (Union[QColor) –
- 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 Gooch material.- Parameters
technique (QgsMaterialSettingsRenderingTechnique) –
- Return type
bool
- toExportParameters(self) → Dict[str, str]¶
- Return type
Dict[str, str]
- type(self) → str¶
- Return type
str
- warm(self) → QColor¶
Returns warm color component
- Return type
QColor
- writeXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters
elem (QDomElement) –
context (QgsReadWriteContext) –