--- ray/src/rt/ray.h 1989/04/11 13:16:43 1.2 +++ ray/src/rt/ray.h 1991/11/12 17:10:16 2.1 @@ -1,4 +1,4 @@ -/* Copyright (c) 1986 Regents of the University of California */ +/* Copyright (c) 1990 Regents of the University of California */ /* SCCSid "$SunId$ LBL" */ @@ -37,18 +37,27 @@ typedef struct ray { int rsrc; /* source we're aiming for */ OBJECT *clipset; /* set of objects currently clipped */ OBJECT *newcset; /* next clipset, used for transmission */ + int (*revf)(); /* evaluation function for this ray */ OBJREC *ro; /* intersected object */ double rot; /* distance to object */ FVECT rop; /* intersection point */ FVECT ron; /* intersection surface normal */ double rod; /* -DOT(rdir, ron) */ - double rofx[4][4]; /* transform from object space */ - double rofs; /* scaling factor from object */ - double robx[4][4]; /* transform back to object space */ - double robs; /* back scaling factor */ + FULLXF *rox; /* object transformation */ FVECT pert; /* surface normal perturbation */ COLOR pcol; /* pattern color */ COLOR rcol; /* returned ray value */ + double rt; /* returned effective ray length */ } RAY; +extern int raytrace(); + extern double raynormal(); + +extern int dimlist[]; /* dimension list for distribution */ +extern int ndims; /* number of dimensions so far */ +extern int samplendx; /* index for this sample */ + +#define MAXDIM 16 /* maximum number of dimensions */ + +#define rayvalue(r) (*(r)->revf)(r)