--- ray/src/rt/source.h 1989/02/02 10:41:15 1.1 +++ ray/src/rt/source.h 1991/02/11 08:43:46 1.5 @@ -13,6 +13,8 @@ #define SPROX 04 /* source proximity flag */ #define SSPOT 010 /* source spotlight flag */ +#define AIMREQT 100 /* required aim success/failure */ + typedef struct { float siz; /* output solid angle */ float flen; /* focal length */ @@ -28,14 +30,25 @@ typedef struct { float prox; /* proximity */ SPOT *s; /* spot */ } sl; /* localized source information */ + int aimsuccess; /* aim successes - AIMREQT*failures */ + long ntests, nhits; /* shadow tests and hits */ OBJREC *so; /* source object */ -} SOURCE; /* light source */ +} SRCREC; /* light source */ -#define MAXSOURCE 512 /* maximum # of sources */ +typedef struct { + FVECT dir; /* source direction */ + float dom; /* domega for source */ + COLOR val; /* contribution */ +} CONTRIB; /* direct contribution */ -extern SOURCE srcval[MAXSOURCE]; /* our source list */ +typedef struct { + int sno; /* source number */ + float brt; /* brightness (for comparison) */ +} CNTPTR; /* contribution pointer */ + +extern SRCREC *source; /* our source list */ extern int nsources; /* the number of sources */ -extern double srcray(); /* ray to source */ +extern double srcray(); /* ray to source */ extern SPOT *makespot(); /* make spotlight */