Click or drag to resize
DigitalRuneEphemerisGetSunlight Method
Computes the sunlight intensity.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static void GetSunlight(
	float altitude,
	float turbidity,
	Vector3D sunDirection,
	out Vector3F directSunlight,
	out Vector3F scatteredSunlight
)

Parameters

altitude
Type: SystemSingle
The altitude (elevation) of the observer's position in meters above the mean sea level.
turbidity
Type: SystemSingle
The turbidity, which measures how polluted the air is. The values should be in the range [1.8, 20]. A turbidity of 2 describes a clear day whereas a turbidity of 20 represents thick haze. A commonly used value is 2.2.
sunDirection
Type: DigitalRune.Mathematics.AlgebraVector3D
The direction from the observer's position to the sun.
directSunlight
Type: DigitalRune.Mathematics.AlgebraVector3F
The direct sunlight illuminance in [lux].
scatteredSunlight
Type: DigitalRune.Mathematics.AlgebraVector3F
The scattered sunlight illuminance (= ambient light, indirect light or "skylight" contribution of the sun) in [lux].
Remarks

The light values are computed for the earth using NASA data, experimental data and a physically-based model of the atmosphere.

All light values are computed for a cloudless sky. When the sky is cloudy, reduce the direct light and increase the scattered/ambient light. Additionally you will want to increase the ambient light at night to model light pollution.

Thread-Safety: This method is not thread-safe, i.e. it must not be called simultaneously from multiple threads.

See Also