FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
visual::sky::CloudShadowField Class Reference

Public Member Functions

 CloudShadowField (const CloudLayer &layer, const std::vector< std::uint8_t > &noise, int n, const CloudVolumeParams &volume)
 
std::array< double, 2 > Weather (double x, double y, const CloudDrift &drift) const
 Weather at (x, y): (coverage, thickness) as CloudWeather in Sky/volumetric.h.
 
double Density (double x, double y, double altitude, const CloudDrift &drift) const
 Density in [0, 1] at (x, y) and altitude [m], as CloudDensity (no fine erosion) in Sky/volumetric.h.
 
double SunTransmittance (double x, double y, const std::array< double, 3 > &sun, const CloudDrift &drift) const
 
CloudShadowMap Build (double cx, double cy, double size, int resolution, const std::array< double, 3 > &sun, const CloudDrift &drift) const
 A map of SunTransmittance over the square of side size centred on (cx, cy), resolution texels per side.
 

Constructor & Destructor Documentation

◆ CloudShadowField()

visual::sky::CloudShadowField::CloudShadowField ( const CloudLayer &  layer,
const std::vector< std::uint8_t > &  noise,
int  n,
const CloudVolumeParams &  volume 
)
Parameters
[in]layerThe cloud layer (the weather map), kept by reference: it must outlive the field.
[in]noiseThe 3D noise cube (MakeCloudVolumeNoise, RGBA bytes), n^3.
[in]nIts texels per side.
[in]volumeThe slab.

Member Function Documentation

◆ SunTransmittance()

double visual::sky::CloudShadowField::SunTransmittance ( double  x,
double  y,
const std::array< double, 3 > &  sun,
const CloudDrift &  drift 
) const

Transmittance of the direct sun from the sea-level point (x, y) through the clouds.

Parameters
[in]sunTowards the sun, NED, unit; 1 when it is below 1 degree (no direct sun to shade).

The documentation for this class was generated from the following file: