Class: QgsDirectionalLightSettings

class qgis.3d.QgsDirectionalLightSettings

Bases: sip.wrapper

Construct a directional light with default values

QgsDirectionalLightSettings(QgsDirectionalLightSettings)

Definition of a directional light in a 3D map scene

Methods

color

Returns color of the light

direction

Returns the direction of the light in degrees

intensity

Returns intensity of the light

readXml

Reads configuration from a DOM element previously written using writeXml()

setColor

Sets color of the light

setDirection

Sets the direction of the light in degrees

setIntensity

Sets intensity of the light

writeXml

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

QgsVector3D

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: 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) –

writeXml(self, doc: QDomDocument)QDomElement

Writes configuration to a new DOM element and returns it

Parameters

doc (QDomDocument) –

Return type

QDomElement