--- ray/src/util/glare.h 1991/03/19 09:08:17 1.5 +++ ray/src/util/glare.h 1991/03/20 13:47:38 1.9 @@ -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; @@ -53,8 +62,8 @@ struct srcspan { extern struct source { FVECT dir; /* source direction */ - float dom; /* solid angle of source */ - float brt; /* average source brightness */ + double dom; /* solid angle of source */ + double brt; /* average source brightness */ struct srcspan *first; /* first span for this source */ struct source *next; /* next source in list */ } *donelist; /* finished sources */