Class: QgsSunLightSettings

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

A light source based on the real-world sun position.

Added in version 4.2.

Class Hierarchy

Inheritance diagram of qgis._3d.QgsSunLightSettings

Base classes

QgsLightSource

Base class for light sources in 3d scenes.

Methods

atmosphericPressure

Returns the atmospheric pressure (in millibars/hPa) used for the solar refraction calculation.

color

Returns the base color of the sunlight.

direction

Returns the calculated direction of the light

intensity

Returns the base intensity of the sunlight.

referenceElevation

Returns the reference elevation (in meters above sea level) used for the solar position calculation.

setAtmosphericPressure

Sets the atmospheric pressure (in millibars/hPa) for the solar refraction calculation.

setColor

Sets the base color of the sunlight.

setIntensity

Sets the base intensity of the sunlight.

setReferenceElevation

Sets the reference elevation (in meters above sea level) for the solar position calculation.

setSunTime

Sets the date and time for the sun position calculation.

setTemperature

Sets the ambient temperature (in Celsius) for the solar refraction calculation.

sunTime

Returns the configured date and time for the sun position calculation.

temperature

Returns the ambient temperature (in Celsius) used for the solar refraction calculation.

class qgis._3d.QgsSunLightSettings[source]

Bases: QgsLightSource

atmosphericPressure(self) float[source]

Returns the atmospheric pressure (in millibars/hPa) used for the solar refraction calculation.

Return type:

float

color(self) QColor[source]

Returns the base color of the sunlight.

See also

setColor()

Return type:

QColor

direction(self, map: Qgs3DMapSettings) QgsVector3D[source]

Returns the calculated direction of the light

Parameters:

map (Qgs3DMapSettings)

Return type:

QgsVector3D

intensity(self) float[source]

Returns the base intensity of the sunlight.

See also

setIntensity()

Return type:

float

referenceElevation(self) float[source]

Returns the reference elevation (in meters above sea level) used for the solar position calculation.

Return type:

float

setAtmosphericPressure(self, pressure: float)[source]

Sets the atmospheric pressure (in millibars/hPa) for the solar refraction calculation.

Parameters:

pressure (float)

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

Sets the base color of the sunlight.

See also

color()

Parameters:

color (Union[QColor, Qt.GlobalColor, int])

setIntensity(self, intensity: float)[source]

Sets the base intensity of the sunlight.

See also

intensity()

Parameters:

intensity (float)

setReferenceElevation(self, elevation: float)[source]

Sets the reference elevation (in meters above sea level) for the solar position calculation.

Parameters:

elevation (float)

setSunTime(self, time: QDateTime | datetime.datetime)[source]

Sets the date and time for the sun position calculation.

See also

sunTime()

Parameters:

time (Union[QDateTime, datetime.datetime])

setTemperature(self, temperature: float)[source]

Sets the ambient temperature (in Celsius) for the solar refraction calculation.

See also

temperature()

Parameters:

temperature (float)

sunTime(self) QDateTime[source]

Returns the configured date and time for the sun position calculation.

See also

setSunTime()

Return type:

QDateTime

temperature(self) float[source]

Returns the ambient temperature (in Celsius) used for the solar refraction calculation.

See also

setTemperature()

Return type:

float