13 |
|
|
14 |
|
#define GLAREBR 10.0 /* glare source is this * avg. lum. */ |
15 |
|
|
16 |
< |
#define SAMPDENS 50 /* samples per unit in image */ |
16 |
> |
#define SAMPDENS 50 /* default samples per unit in image */ |
17 |
|
#define TSAMPSTEP 10 /* sample step to compute threshold */ |
18 |
|
|
19 |
|
#define SEPS 2 /* sources this close ==> contig. */ |
25 |
|
extern int verbose; /* verbose reporting */ |
26 |
|
extern char *progname; /* global argv[0] */ |
27 |
|
|
28 |
+ |
extern double threshold; /* threshold value for glare sources */ |
29 |
+ |
|
30 |
+ |
extern int sampdens; /* sample density */ |
31 |
|
extern ANGLE glarang[]; /* glare calculation angles */ |
32 |
|
extern int nglarangs; |
33 |
|
extern double maxtheta; /* maximum glare angle (in radians) */ |
35 |
|
extern int hlim; /* horizontal limit of central view */ |
36 |
|
|
37 |
|
#define nglardirs (2*nglarangs+1) |
38 |
< |
#define vsize SAMPDENS |
39 |
< |
#define h_theta(h) ((double)(h)/(double)SAMPDENS) |
38 |
> |
#define vsize (sampdens-1) |
39 |
> |
#define h_theta(h) (-(double)(h)/(double)sampdens) |
40 |
|
|
41 |
|
extern struct illum { |
42 |
|
float theta; /* glare direction */ |
55 |
|
|
56 |
|
extern struct source { |
57 |
|
FVECT dir; /* source direction */ |
58 |
< |
float dom; /* solid angle of source */ |
59 |
< |
float brt; /* average source brightness */ |
58 |
> |
double dom; /* solid angle of source */ |
59 |
> |
double brt; /* average source brightness */ |
60 |
|
struct srcspan *first; /* first span for this source */ |
61 |
|
struct source *next; /* next source in list */ |
62 |
|
} *donelist; /* finished sources */ |