--- ray/src/rt/source.h 1991/06/24 16:10:57 1.10 +++ ray/src/rt/source.h 1991/07/16 15:56:44 1.12 @@ -36,7 +36,10 @@ typedef struct { } sl; /* localized source information */ union { int success; /* successes - AIMREQT*failures */ - int svnext; /* next source to aim for */ + struct { + short pn; /* projection number */ + short sn; /* next source to aim for */ + } sv; /* virtual source */ } sa; /* source aiming information */ long ntests, nhits; /* shadow tests and hits */ OBJREC *so; /* source destination object */ @@ -83,6 +86,8 @@ extern double srcray(); /* ray to sour extern int srcvalue(); /* compute source value w/o shadows */ extern double intercircle(); /* intersect two circles */ +extern double spotdisk(); /* intersecting disk for spot */ +extern double beamdisk(); /* intersecting disk for beam */ extern SPOT *makespot(); /* make spotlight */ @@ -91,3 +96,7 @@ extern double shadthresh; /* relative shadow thresho extern double shadcert; /* shadow testing certainty */ extern int directrelay; /* maximum number of source relays */ extern int vspretest; /* virtual source pretest density */ + +#define getplaneq(c,o) (*sfun[(o)->otype].of->getpleq)(c,o) +#define getmaxdisk(c,o) (*sfun[(o)->otype].of->getdisk)(c,o) +#define setsource(s,o) (*sfun[(o)->otype].of->setsrc)(s,o)