--- ray/src/rt/ray.h 1995/11/02 17:38:07 2.5 +++ ray/src/rt/ray.h 1997/03/07 16:53:02 2.11 @@ -14,6 +14,8 @@ #include "color.h" +#define MAXDIM 32 /* maximum number of dimensions */ + /* ray type flags */ #define PRIMARY 01 /* original ray */ #define SHADOW 02 /* ray to light source */ @@ -40,7 +42,8 @@ typedef struct ray { 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 */ + OBJECT robj; /* intersected object number */ + OBJREC *ro; /* intersected object (one with material) */ double rot; /* distance to object */ FVECT rop; /* intersection point */ FVECT ron; /* intersection surface normal */ @@ -50,18 +53,20 @@ typedef struct ray { COLOR pcol; /* pattern color */ COLOR rcol; /* returned ray value */ double rt; /* returned effective ray length */ + COLOR cext; /* medium extinction coefficient */ + COLOR albedo; /* medium scattering albedo */ + float gecc; /* scattering eccentricity coefficient */ + int *slights; /* list of lights to test for scattering */ } RAY; extern int raytrace(); extern double raynormal(); -extern double raydistance(); +extern double raydist(); extern int dimlist[]; /* dimension list for distribution */ extern int ndims; /* number of dimensions so far */ extern int samplendx; /* index for this sample */ - -#define MAXDIM 32 /* maximum number of dimensions */ #define rayvalue(r) (*(r)->revf)(r)