Class: QgsDirectionalLightSettings

Definition of a directional light in a 3D map scene.

Added in version 3.16.

Class Hierarchy

Inheritance diagram of qgis._3d.QgsDirectionalLightSettings

Base classes

QgsLightSource

Base class for light sources in 3d scenes.

class qgis._3d.QgsDirectionalLightSettings[source]

Bases: QgsLightSource

__init__()

Construct a directional light with default values

__init__(a0: QgsDirectionalLightSettings)
Parameters:

a0 (QgsDirectionalLightSettings)

color(self) QColor[source]

Returns color of the light

Return type:

QColor

direction(self) QgsVector3D[source]

Returns the direction of the light in degrees

Return type:

QgsVector3D

intensity(self) float[source]

Returns intensity of the light

Return type:

float

setColor(self, color: QColor | Qt.GlobalColor)[source]

Sets color of the light

Parameters:

color (Union[QColor, Qt.GlobalColor])

setDirection(self, direction: QgsVector3D)[source]

Sets the direction of the light in degrees

Parameters:

direction (QgsVector3D)

setIntensity(self, intensity: float)[source]

Sets intensity of the light

Parameters:

intensity (float)