Class: QgsPhongMaterialSettings¶
-
class
qgis.3d.
QgsPhongMaterialSettings
¶ Bases:
sip.wrapper
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 ambient color component
Returns diffuse color component
Reads settings from a DOM element
Sets ambient color component
Sets diffuse color component
Sets shininess of the surface
Sets specular color component
Returns shininess of the surface
Returns specular color component
Writes settings to a DOM element
-
ambient
(self) → QColor¶ Returns ambient color component
- Return type
QColor
-
diffuse
(self) → QColor¶ Returns diffuse color component
- Return type
QColor
-
readXml
(self, elem: QDomElement)¶ Reads settings from a DOM element
- Parameters
elem (QDomElement) –
-
setAmbient
(self, ambient: Union[QColor, Qt.GlobalColor])¶ Sets ambient color component
- Parameters
ambient (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) –
-
shininess
(self) → float¶ Returns shininess of the surface
- Return type
float
-
specular
(self) → QColor¶ Returns specular color component
- Return type
QColor
-
writeXml
(self, elem: QDomElement)¶ Writes settings to a DOM element
- Parameters
elem (QDomElement) –
-