Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/util/util_sky_model.h')
-rw-r--r--intern/cycles/util/util_sky_model.h71
1 files changed, 29 insertions, 42 deletions
diff --git a/intern/cycles/util/util_sky_model.h b/intern/cycles/util/util_sky_model.h
index 2e593f58c39..84340614b2c 100644
--- a/intern/cycles/util/util_sky_model.h
+++ b/intern/cycles/util/util_sky_model.h
@@ -28,7 +28,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
/* ============================================================================
This file is part of a sample implementation of the analytical skylight and
@@ -92,7 +91,6 @@ an updated version of this code has been published!
============================================================================ */
-
/*
This code is taken from ART, a rendering research system written in a
@@ -303,11 +301,10 @@ HINT #1: if you want to model the sky of an earth-like planet that orbits
CCL_NAMESPACE_BEGIN
#ifndef _SKY_MODEL_H_
-#define _SKY_MODEL_H_
+# define _SKY_MODEL_H_
typedef double ArHosekSkyModelConfiguration[9];
-
// Spectral version of the model
/* ----------------------------------------------------------------------------
@@ -336,18 +333,16 @@ typedef double ArHosekSkyModelConfiguration[9];
---------------------------------------------------------------------------- */
-typedef struct ArHosekSkyModelState
-{
- ArHosekSkyModelConfiguration configs[11];
- double radiances[11];
- double turbidity;
- double solar_radius;
- double emission_correction_factor_sky[11];
- double emission_correction_factor_sun[11];
- double albedo;
- double elevation;
-}
-ArHosekSkyModelState;
+typedef struct ArHosekSkyModelState {
+ ArHosekSkyModelConfiguration configs[11];
+ double radiances[11];
+ double turbidity;
+ double solar_radius;
+ double emission_correction_factor_sky[11];
+ double emission_correction_factor_sun[11];
+ double albedo;
+ double elevation;
+} ArHosekSkyModelState;
/* ----------------------------------------------------------------------------
@@ -358,11 +353,9 @@ ArHosekSkyModelState;
---------------------------------------------------------------------------- */
-ArHosekSkyModelState *arhosekskymodelstate_alloc_init(
- const double solar_elevation,
- const double atmospheric_turbidity,
- const double ground_albedo);
-
+ArHosekSkyModelState *arhosekskymodelstate_alloc_init(const double solar_elevation,
+ const double atmospheric_turbidity,
+ const double ground_albedo);
/* ----------------------------------------------------------------------------
@@ -393,14 +386,14 @@ ArHosekSkyModelState *arhosekskymodelstate_alloc_init(
---------------------------------------------------------------------------- */
-ArHosekSkyModelState* arhosekskymodelstate_alienworld_alloc_init(
- const double solar_elevation,
- const double solar_intensity,
- const double solar_surface_temperature_kelvin,
- const double atmospheric_turbidity,
- const double ground_albedo);
+ArHosekSkyModelState *arhosekskymodelstate_alienworld_alloc_init(
+ const double solar_elevation,
+ const double solar_intensity,
+ const double solar_surface_temperature_kelvin,
+ const double atmospheric_turbidity,
+ const double ground_albedo);
-void arhosekskymodelstate_free(ArHosekSkyModelState *state);
+void arhosekskymodelstate_free(ArHosekSkyModelState *state);
double arhosekskymodel_radiance(ArHosekSkyModelState *state,
double theta,
@@ -409,20 +402,15 @@ double arhosekskymodel_radiance(ArHosekSkyModelState *state,
// CIE XYZ and RGB versions
+ArHosekSkyModelState *arhosek_xyz_skymodelstate_alloc_init(const double turbidity,
+ const double albedo,
+ const double elevation);
-ArHosekSkyModelState * arhosek_xyz_skymodelstate_alloc_init(
- const double turbidity,
- const double albedo,
- const double elevation);
+ArHosekSkyModelState *arhosek_rgb_skymodelstate_alloc_init(const double turbidity,
+ const double albedo,
+ const double elevation);
-
-ArHosekSkyModelState * arhosek_rgb_skymodelstate_alloc_init(
- const double turbidity,
- const double albedo,
- const double elevation);
-
-
-double arhosek_tristim_skymodel_radiance(ArHosekSkyModelState* state,
+double arhosek_tristim_skymodel_radiance(ArHosekSkyModelState *state,
double theta,
double gamma,
int channel);
@@ -431,12 +419,11 @@ double arhosek_tristim_skymodel_radiance(ArHosekSkyModelState* state,
// Please read the above description before using this - there are several
// caveats!
-double arhosekskymodel_solar_radiance(ArHosekSkyModelState* state,
+double arhosekskymodel_solar_radiance(ArHosekSkyModelState *state,
double theta,
double gamma,
double wavelength);
-
#endif // _SKY_MODEL_H_
CCL_NAMESPACE_END