--- ray/src/rt/ray.h 2005/04/19 01:15:06 2.25 +++ ray/src/rt/ray.h 2005/06/13 20:07:56 2.27 @@ -1,4 +1,4 @@ -/* RCSid $Id: ray.h,v 2.25 2005/04/19 01:15:06 greg Exp $ */ +/* RCSid $Id: ray.h,v 2.27 2005/06/13 20:07:56 greg Exp $ */ /* * ray.h - header file for routines using rays. */ @@ -42,6 +42,7 @@ typedef struct ray { int rsrc; /* source we're aiming for */ OBJECT *clipset; /* set of objects currently clipped */ OBJECT *newcset; /* next clipset, used for transmission */ + void (*revf)(struct ray *); /* ray evaluation function */ void (*hitf)(OBJECT *, struct ray *); /* custom hit test */ OBJECT robj; /* intersected object number */ OBJREC *ro; /* intersected object (one with material) */ @@ -61,6 +62,8 @@ typedef struct ray { int *slights; /* list of lights to test for scattering */ } RAY; +#define rayvalue(r) (*(r)->revf)(r) + extern char VersionID[]; /* Radiance version ID string */ extern CUBE thescene; /* our scene */ @@ -82,6 +85,8 @@ extern int ray_savesiz; /* size of parameter save buff extern int do_irrad; /* compute irradiance? */ +extern int rand_samp; /* pure Monte Carlo sampling? */ + extern double dstrsrc; /* square source distribution */ extern double shadthresh; /* shadow threshold */ extern double shadcert; /* shadow testing certainty */ @@ -124,6 +129,7 @@ extern int ray_pnidle; /* number of idle processes */ typedef struct { /* rendering parameter holder */ int do_irrad; + int rand_samp; double dstrsrc; double shadthresh; double shadcert; @@ -191,7 +197,7 @@ extern void ray_pclose(int nsub); /* defined in raytrace.c */ extern int rayorigin(RAY *r, int rt, const RAY *ro, const COLOR rc); extern void rayclear(RAY *r); -extern void rayvalue(RAY *r); +extern void raytrace(RAY *r); extern void rayhit(OBJECT *oset, RAY *r); extern void raycont(RAY *r); extern void raytrans(RAY *r);