Class: QgsDirectionalLightSettings¶
- class qgis._3d.QgsDirectionalLightSettings¶
Bases:
sip.wrapper
Definition of a directional light in a 3D map scene
New in version 3.16.
QgsDirectionalLightSettings() Construct a directional light with default values
QgsDirectionalLightSettings(
QgsDirectionalLightSettings
)Methods
Returns color of the light
Returns the direction of the light in degrees
Returns intensity of the light
Reads configuration from a DOM element previously written using
writeXml()
Sets color of the light
Sets the direction of the light in degrees
Sets intensity of the light
Writes configuration to a new DOM element and returns it
- color(self) QColor ¶
Returns color of the light
- Return type:
QColor
- direction(self) QgsVector3D ¶
Returns the direction of the light in degrees
- Return type:
- intensity(self) float ¶
Returns intensity of the light
- Return type:
float
- readXml(self, elem: QDomElement)¶
Reads configuration from a DOM element previously written using
writeXml()
- Parameters:
elem (QDomElement) –
- setColor(self, color: QColor | Qt.GlobalColor)¶
Sets color of the light
- Parameters:
color (Union[QColor) –
- setDirection(self, direction: QgsVector3D)¶
Sets the direction of the light in degrees
- Parameters:
direction (QgsVector3D) –
- setIntensity(self, intensity: float)¶
Sets intensity of the light
- Parameters:
intensity (float) –
- writeXml(self, doc: QDomDocument) QDomElement ¶
Writes configuration to a new DOM element and returns it
- Parameters:
doc (QDomDocument) –
- Return type:
QDomElement