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

clone

rtype

QgsDirectionalLightSettings

color

Returns color of the light

direction

Returns the direction of the light in degrees

intensity

Returns intensity of the light

readXml

param elem

setColor

Sets color of the light

setDirection

Sets the direction of the light in degrees

setIntensity

Sets intensity of the light

type

rtype

Qgis.LightSourceType

writeXml

param doc

clone(self) QgsDirectionalLightSettings
Return type

QgsDirectionalLightSettings

color(self) QColor

Returns color of the light

Return type

QColor

direction(self) QgsVector3D

Returns the direction of the light in degrees

Return type

QgsVector3D

intensity(self) float

Returns intensity of the light

Return type

float

readXml(self, elem: QDomElement, context: QgsReadWriteContext = QgsReadWriteContext())
Parameters
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

Qgis.LightSourceType

writeXml(self, doc: QDomDocument, context: QgsReadWriteContext = QgsReadWriteContext()) QDomElement
Parameters
Return type

QDomElement