--- ray/src/rt/ray.h 1989/02/02 10:41:14 1.1 +++ ray/src/rt/ray.h 1991/06/20 13:29:31 1.6 @@ -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,15 +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 ros, rox[4][4]; /* transform back to object space */ + 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)