Changeset View
Changeset View
Standalone View
Standalone View
intern/sky/include/sky_model.h
| Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | /* ---------------------------------------------------------------------------- | ||||
| arhosekskymodelstate_alloc_init() function | arhosekskymodelstate_alloc_init() function | ||||
| ------------------------------------------ | ------------------------------------------ | ||||
| Initialises an ArHosekSkyModelState struct for a terrestrial setting. | Initialises an ArHosekSkyModelState struct for a terrestrial setting. | ||||
| ---------------------------------------------------------------------------- */ | ---------------------------------------------------------------------------- */ | ||||
| SKY_ArHosekSkyModelState *SKY_arhosekskymodelstate_alloc_init(const double solar_elevation, | SKY_ArHosekSkyModelState *SKY_arhosekskymodelstate_alloc_init(const double solar_elevation, | ||||
| const double atmospheric_turbidity, | const double atmospheric_turbidity, | ||||
| const double ground_albedo); | const double ground_albedo); | ||||
| /* ---------------------------------------------------------------------------- | /* ---------------------------------------------------------------------------- | ||||
| arhosekskymodelstate_alienworld_alloc_init() function | arhosekskymodelstate_alienworld_alloc_init() function | ||||
| ----------------------------------------------------- | ----------------------------------------------------- | ||||
| Initialises an ArHosekSkyModelState struct for an "alien world" setting | Initialises an ArHosekSkyModelState struct for an "alien world" setting | ||||
| with a sun of a surface temperature given in 'kelvin'. The parameter | with a sun of a surface temperature given in 'kelvin'. The parameter | ||||
| Show All 24 Lines | SKY_ArHosekSkyModelState *SKY_arhosekskymodelstate_alienworld_alloc_init( | ||||
| const double solar_intensity, | const double solar_intensity, | ||||
| const double solar_surface_temperature_kelvin, | const double solar_surface_temperature_kelvin, | ||||
| const double atmospheric_turbidity, | const double atmospheric_turbidity, | ||||
| const double ground_albedo); | const double ground_albedo); | ||||
| void SKY_arhosekskymodelstate_free(SKY_ArHosekSkyModelState *state); | void SKY_arhosekskymodelstate_free(SKY_ArHosekSkyModelState *state); | ||||
| double SKY_arhosekskymodel_radiance(SKY_ArHosekSkyModelState *state, | double SKY_arhosekskymodel_radiance(SKY_ArHosekSkyModelState *state, | ||||
| double theta, | double theta, | ||||
| double gamma, | double gamma, | ||||
| double wavelength); | double wavelength); | ||||
| // CIE XYZ and RGB versions | // CIE XYZ and RGB versions | ||||
| SKY_ArHosekSkyModelState *SKY_arhosek_xyz_skymodelstate_alloc_init(const double turbidity, | SKY_ArHosekSkyModelState *SKY_arhosek_xyz_skymodelstate_alloc_init(const double turbidity, | ||||
| const double albedo, | const double albedo, | ||||
| const double elevation); | const double elevation); | ||||
| SKY_ArHosekSkyModelState *SKY_arhosek_rgb_skymodelstate_alloc_init(const double turbidity, | SKY_ArHosekSkyModelState *SKY_arhosek_rgb_skymodelstate_alloc_init(const double turbidity, | ||||
| const double albedo, | const double albedo, | ||||
| const double elevation); | const double elevation); | ||||
| double SKY_arhosek_tristim_skymodel_radiance(SKY_ArHosekSkyModelState *state, | double SKY_arhosek_tristim_skymodel_radiance(SKY_ArHosekSkyModelState *state, | ||||
| double theta, | double theta, | ||||
| double gamma, | double gamma, | ||||
| int channel); | int channel); | ||||
| // Delivers the complete function: sky + sun, including limb darkening. | // Delivers the complete function: sky + sun, including limb darkening. | ||||
| // Please read the above description before using this - there are several | // Please read the above description before using this - there are several | ||||
| // caveats! | // caveats! | ||||
| double SKY_arhosekskymodel_solar_radiance(SKY_ArHosekSkyModelState *state, | double SKY_arhosekskymodel_solar_radiance(SKY_ArHosekSkyModelState *state, | ||||
| double theta, | double theta, | ||||
| double gamma, | double gamma, | ||||
| double wavelength); | double wavelength); | ||||
| /* Nishita improved sky model */ | /* Nishita improved sky model */ | ||||
| void SKY_nishita_skymodel_precompute_texture(float *pixels, | void SKY_nishita_skymodel_precompute_texture(float *pixels, | ||||
| int stride, | int stride, | ||||
| int start_y, | int start_y, | ||||
| int end_y, | int end_y, | ||||
| int width, | int width, | ||||
| int height, | int height, | ||||
| float sun_elevation, | float sun_elevation, | ||||
| float altitude, | float altitude, | ||||
| float air_density, | float air_density, | ||||
| float dust_density, | float dust_density, | ||||
| float ozone_density); | float ozone_density); | ||||
| void SKY_nishita_skymodel_precompute_sun(float sun_elevation, | void SKY_nishita_skymodel_precompute_sun(float sun_elevation, | ||||
| float angular_diameter, | float angular_diameter, | ||||
| float altitude, | float altitude, | ||||
| float air_density, | float air_density, | ||||
| float dust_density, | float dust_density, | ||||
| float *pixel_bottom, | float *r_pixel_bottom, | ||||
| float *pixel_top); | float *r_pixel_top); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif // __SKY_MODEL_H__ | #endif // __SKY_MODEL_H__ | ||||