| EphemerisGetMoonlight Method |
Computes the moonlight intensity.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static void GetMoonlight(
float altitude,
float turbidity,
Vector3D moonPosition,
float phaseAngle,
out Vector3F directMoonlight,
out Vector3F scatteredMoonlight
)
Public Shared Sub GetMoonlight (
altitude As Single,
turbidity As Single,
moonPosition As Vector3D,
phaseAngle As Single,
<OutAttribute> ByRef directMoonlight As Vector3F,
<OutAttribute> ByRef scatteredMoonlight As Vector3F
)
public:
static void GetMoonlight(
float altitude,
float turbidity,
Vector3D moonPosition,
float phaseAngle,
[OutAttribute] Vector3F% directMoonlight,
[OutAttribute] Vector3F% scatteredMoonlight
)
static member GetMoonlight :
altitude : float32 *
turbidity : float32 *
moonPosition : Vector3D *
phaseAngle : float32 *
directMoonlight : Vector3F byref *
scatteredMoonlight : Vector3F byref -> unit
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.
- moonPosition
- Type: DigitalRune.Mathematics.AlgebraVector3D
The moon position in world space. - phaseAngle
- Type: SystemSingle
The moon phase angle in radians in the range [0, 2π]. A new moon has a phase angle of 0. A
full moon has a phase angle of π.
- directMoonlight
- Type: DigitalRune.Mathematics.AlgebraVector3F
The direct moonlight illuminance in [lux]. - scatteredMoonlight
- Type: DigitalRune.Mathematics.AlgebraVector3F
The scattered moonlight illuminance (= ambient light, indirect light or "skylight"
contribution of the moon) 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