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¶
Base classes¶
Base class for light sources in 3d scenes. |
Methods
Returns the atmospheric pressure (in millibars/hPa) used for the solar refraction calculation. |
|
Returns the base color of the sunlight. |
|
Returns the calculated direction of the light |
|
Returns the base intensity of the sunlight. |
|
Returns the reference elevation (in meters above sea level) used for the solar position calculation. |
|
Sets the atmospheric pressure (in millibars/hPa) for the solar refraction calculation. |
|
Sets the base color of the sunlight. |
|
Sets the base intensity of the sunlight. |
|
Sets the reference elevation (in meters above sea level) for the solar position calculation. |
|
Sets the date and time for the sun position calculation. |
|
Sets the ambient temperature (in Celsius) for the solar refraction calculation. |
|
Returns the configured date and time for the sun position calculation. |
|
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.
See also
- Return type:
float
- direction(self, map: Qgs3DMapSettings) QgsVector3D[source]¶
Returns the calculated direction of the light
- Parameters:
map (Qgs3DMapSettings)
- Return type:
- intensity(self) float[source]¶
Returns the base intensity of the sunlight.
See also
- Return type:
float
- referenceElevation(self) float[source]¶
Returns the reference elevation (in meters above sea level) used for the solar position calculation.
See also
- Return type:
float
- setAtmosphericPressure(self, pressure: float)[source]¶
Sets the atmospheric
pressure(in millibars/hPa) for the solar refraction calculation.See also
- Parameters:
pressure (float)
- setColor(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the base
colorof the sunlight.See also
- Parameters:
color (Union[QColor, Qt.GlobalColor, int])
- setIntensity(self, intensity: float)[source]¶
Sets the base
intensityof the sunlight.See also
- Parameters:
intensity (float)
- setReferenceElevation(self, elevation: float)[source]¶
Sets the reference
elevation(in meters above sea level) for the solar position calculation.See also
- Parameters:
elevation (float)
- setSunTime(self, time: QDateTime | datetime.datetime)[source]¶
Sets the date and
timefor the sun position calculation.See also
- Parameters:
time (Union[QDateTime, datetime.datetime])
- setTemperature(self, temperature: float)[source]¶
Sets the ambient
temperature(in Celsius) for the solar refraction calculation.See also
- Parameters:
temperature (float)
- sunTime(self) QDateTime[source]¶
Returns the configured date and time for the sun position calculation.
See also
- Return type:
QDateTime