--- ray/src/util/glare.h 1991/03/19 17:31:35 1.7 +++ ray/src/util/glare.h 1991/03/28 16:27:23 1.11 @@ -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 */ @@ -43,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 { @@ -62,3 +69,6 @@ extern struct source { } *donelist; /* finished sources */ extern double getviewpix(); + +extern long npixinvw; /* number of samples in view */ +extern long npixmiss; /* number of samples missing */