Class: QgsDirectionalLightSettings¶
- class qgis.3d.QgsDirectionalLightSettings¶
Bases:
qgis._3d.QgsLightSource
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
- rtype
QgsDirectionalLightSettings
Returns color of the light
Returns the direction of the light in degrees
Returns intensity of the light
- param elem
Sets color of the light
Sets the direction of the light in degrees
Sets intensity of the light
- rtype
Qgis.LightSourceType
- param doc
- clone(self) QgsDirectionalLightSettings ¶
- Return type
- 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, context: QgsReadWriteContext = QgsReadWriteContext())¶
- Parameters
elem (QDomElement) –
context (
QgsReadWriteContext
= QgsReadWriteContext()) –
- setColor(self, color: Union[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) –
- type(self) Qgis.LightSourceType ¶
- Return type
- writeXml(self, doc: QDomDocument, context: QgsReadWriteContext = QgsReadWriteContext()) QDomElement ¶
- Parameters
doc (QDomDocument) –
context (
QgsReadWriteContext
= QgsReadWriteContext()) –
- Return type
QDomElement