--- ray/src/rt/ray.h 1991/06/20 13:29:31 1.6 +++ ray/src/rt/ray.h 1995/11/02 17:38:07 2.5 @@ -1,4 +1,4 @@ -/* Copyright (c) 1990 Regents of the University of California */ +/* Copyright (c) 1995 Regents of the University of California */ /* SCCSid "$SunId$ LBL" */ @@ -21,12 +21,13 @@ #define REFRACTED 010 /* refracted (bent) ray */ #define TRANS 020 /* transmitted/transferred ray */ #define AMBIENT 040 /* ray scattered for interreflection */ +#define SPECULAR 0100 /* ray scattered for specular */ /* reflected ray types */ -#define RAYREFL (SHADOW|REFLECTED|AMBIENT) +#define RAYREFL (SHADOW|REFLECTED|AMBIENT|SPECULAR) typedef struct ray { - long rno; /* unique ray number */ + unsigned long rno; /* unique ray number */ int rlvl; /* number of reflections for this ray */ float rweight; /* cumulative weight of this ray */ short rtype; /* ray type */ @@ -34,6 +35,7 @@ typedef struct ray { struct ray *parent; /* ray this originated from */ FVECT rorg; /* origin of ray */ FVECT rdir; /* normalized direction of ray */ + double rmax; /* maximum distance (aft clipping plane) */ int rsrc; /* source we're aiming for */ OBJECT *clipset; /* set of objects currently clipped */ OBJECT *newcset; /* next clipset, used for transmission */ @@ -54,10 +56,12 @@ extern int raytrace(); extern double raynormal(); +extern double raydistance(); + 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 MAXDIM 32 /* maximum number of dimensions */ #define rayvalue(r) (*(r)->revf)(r)