--- ray/src/rt/source.h 1991/06/20 13:43:36 1.8 +++ ray/src/rt/source.h 1991/06/25 12:32:49 1.11 @@ -47,7 +47,7 @@ typedef struct { */ /* - * Virtual source materials must support the following functions: + * Virtual source materials must define the following. * * vproj(pm, op, sp, i) Compute i'th virtual projection * of source sp in object op and assign @@ -80,12 +80,20 @@ extern SRCREC *source; /* our source list */ extern int nsources; /* the number of sources */ extern double srcray(); /* ray to source */ +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 */ -extern SRCREC *newsource(); /* allocate new source */ - extern double dstrsrc; /* source distribution amount */ extern double shadthresh; /* relative shadow threshold */ 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)