ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/atmos.h
Revision: 2.3
Committed: Wed Oct 9 17:22:42 2024 UTC (6 months, 3 weeks ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 2.2: +12 -1 lines
Log Message:
feat(genssky): Taoning added -L option to specify horiz. illuminance values

File Contents

# Content
1 /* RCSid $Id: atmos.h,v 2.2 2024/07/19 23:38:28 greg Exp $ */
2 #ifndef ATMOS_H
3 #define ATMOS_H
4
5 #include "color.h"
6 #include "data.h"
7 #include "fvect.h"
8 #include "paths.h"
9 #include "rtio.h"
10 #include "rtmath.h"
11 #include "sun.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #define NSSAMP 20
18
19 typedef struct {
20 double width;
21 double exp_term;
22 double exp_scale;
23 double linear_term;
24 double constant_term;
25 } DensityProfileLayer;
26
27 typedef struct {
28 DensityProfileLayer layers[2];
29 } DensityProfile;
30
31 typedef struct {
32 DensityProfile rayleigh_density;
33 DensityProfile ozone_density;
34 const float *beta_r0;
35 float beta_scale;
36 DATARRAY *beta_m;
37 const double grefl;
38 } Atmosphere;
39
40 typedef struct {
41 char tau[PATH_MAX];
42 char scat[PATH_MAX];
43 char scat1m[PATH_MAX];
44 char irrad[PATH_MAX];
45 } DpPaths;
46
47 extern const double ER;
48 extern const double AH;
49 extern const double HR_MS;
50 extern const double HR_MW;
51 extern const double HR_SS;
52 extern const double HR_SW;
53 extern const double HR_T;
54 extern const int WVLSPAN;
55 extern const float EXTSOL[NSSAMP];
56 extern const float BR0_MS[NSSAMP];
57 extern const float BR0_MW[NSSAMP];
58 extern const float BR0_SS[NSSAMP];
59 extern const float BR0_SW[NSSAMP];
60 extern const float BR0_T[NSSAMP];
61 extern const float BCLOUD;
62 extern const double AOD0_CA;
63 extern const double SOLOMG;
64
65 extern void get_rmumusnu(FVECT vpt, FVECT vdir, FVECT sundir, double *r,
66 double *mu, double *mu_s, double *nu);
67
68 extern void get_transmittance_to_sun(DATARRAY *tau_dp, const double r,
69 const double mu_s, double *result);
70
71 extern void get_sky_transmittance(DATARRAY *tau, double r, double mu, float *result);
72
73 extern void get_sky_radiance(DATARRAY *scat, DATARRAY *scat1m, const double radius,
74 const double mu, const double mu_s, const double nu, float *result);
75
76 extern void get_solar_radiance(DATARRAY *tau, DATARRAY *scat, DATARRAY *scat1m, const FVECT sundir, const double radius, const double sun_ct, double *sun_radiance);
77
78 extern void get_ground_radiance(DATARRAY *tau, DATARRAY *scat, DATARRAY *scat1m, DATARRAY *irrad,
79 const FVECT view_point, const FVECT view_direction, const double radius, const double mu, const double sun_ct, const double nu,
80 const double grefl, const FVECT sundir, float *result);
81
82 extern void add_cloud_radiance(DATARRAY *scat, double nu, double pt[4],
83 float *result);
84
85 extern int compute_sundir(const int year, const int month, const int day,
86 const double hour, const int tsolar,
87 double sundir[3]);
88
89 extern int precompute(const int sorder, const DpPaths dppaths, const Atmosphere *atmos,
90 int num_threads);
91
92 extern DATARRAY *get_indirect_irradiance(DATARRAY *dp, const double radius,
93 const double mu_s);
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif /* ATMOS_H */