--- ray/src/util/glare.h 1991/03/19 11:11:18 1.6 +++ ray/src/util/glare.h 1991/03/21 17:11:48 1.10 @@ -6,6 +6,8 @@ * Common data structures for glare source finding routines */ +#define DEBUG 1 + #include "standard.h" #include "view.h" #include "color.h" @@ -18,6 +20,11 @@ #define SEPS 2 /* sources this close ==> contig. */ +#define SAMIN .005 /* minimum solid angle for source */ +#define MAXBUDDY (4.*sqrt(SAMIN/PI)) /* max separation for pairing */ + +#define TOOSMALL(s) ((s)->brt*(s)->dom < threshold*SAMIN) + extern VIEW ourview; /* our view */ extern VIEW pictview; /* picture view */ extern VIEW leftview, rightview; /* leftmost and rightmost views */ @@ -25,6 +32,8 @@ extern VIEW leftview, rightview; /* leftmost and right extern int verbose; /* verbose reporting */ extern char *progname; /* global argv[0] */ +extern double threshold; /* threshold value for glare sources */ + extern int sampdens; /* sample density */ extern ANGLE glarang[]; /* glare calculation angles */ extern int nglarangs; @@ -41,7 +50,7 @@ extern struct illum { float lcos, lsin; /* cosine and sine to left view */ float rcos, rsin; /* cosine and sine to right view */ double sum; /* sum of indirect luminances */ - int n; /* number of values in sum */ + double n; /* number of values in sum */ } *indirect; /* array of indirect illuminances */ struct srcspan {