--- ray/src/rt/ray.h 2019/07/25 16:50:54 2.41 +++ ray/src/rt/ray.h 2022/11/22 02:28:03 2.48 @@ -1,4 +1,4 @@ -/* RCSid $Id: ray.h,v 2.41 2019/07/25 16:50:54 greg Exp $ */ +/* RCSid $Id: ray.h,v 2.48 2022/11/22 02:28:03 greg Exp $ */ /* * ray.h - header file for routines using rays. */ @@ -16,7 +16,7 @@ extern "C" { #endif #ifndef RNUMBER -#define RNUMBER unsigned long /* ray counter (>= sizeof pointer) */ +#define RNUMBER size_t /* ray counter (>= sizeof pointer) */ #endif #define MAXDIM 32 /* maximum number of dimensions */ @@ -57,18 +57,18 @@ typedef struct ray { FULLXF *rox; /* object transformation */ int *slights; /* list of lights to test for scattering */ RNUMBER rno; /* unique ray number */ - short rflips; /* surface orientation has been reversed */ - short rlvl; /* number of reflections for this ray */ + OBJECT robj; /* intersected object number */ int rsrc; /* source we're aiming for */ float rweight; /* cumulative weight (for termination) */ + float gecc; /* scattering eccentricity coefficient */ COLOR rcoef; /* contribution coefficient w.r.t. parent */ COLOR pcol; /* pattern color */ COLOR mcol; /* mirrored color contribution */ COLOR rcol; /* returned radiance value */ COLOR cext; /* medium extinction coefficient */ COLOR albedo; /* medium scattering albedo */ - float gecc; /* scattering eccentricity coefficient */ - OBJECT robj; /* intersected object number */ + short rflips; /* surface orientation has been reversed */ + short rlvl; /* number of reflections for this ray */ short rtype; /* ray type */ short crtype; /* cumulative ray type */ } RAY; @@ -80,7 +80,8 @@ typedef struct ray { #define rayreorient(r) if ((r)->rflips & 1) flipsurface(r); else -extern char VersionID[]; /* Radiance version ID string */ +extern char VersionID[]; /* Radiance version ID string */ +extern char RFeatureList[]; /* newline-separated feature list */ extern CUBE thescene; /* our scene */ extern OBJECT nsceneobjs; /* number of objects in our scene */ @@ -97,8 +98,6 @@ extern int dimlist[]; /* dimension list for distributi extern int ndims; /* number of dimensions so far */ extern int samplendx; /* index for this sample */ -extern int ray_savesiz; /* size of parameter save buffer */ - extern int do_irrad; /* compute irradiance? */ extern int rand_samp; /* pure Monte Carlo sampling? */ @@ -186,7 +185,7 @@ extern void headclean(void); extern void openheader(void); extern void dupheader(void); /* defined in persist.c */ -extern void persistfile(char *pfn); +extern void persistfile(char *pfn); extern void pfdetach(void); extern void pfclean(void); extern void pflock(int lf); @@ -221,6 +220,7 @@ extern int ray_fifo_flush(void); extern int rayorigin(RAY *r, int rt, const RAY *ro, const COLOR rc); extern void rayclear(RAY *r); extern void raytrace(RAY *r); +extern int rayreject(OBJREC *o, RAY *r, double t); extern void rayhit(OBJECT *oset, RAY *r); extern void raycont(RAY *r); extern void raytrans(RAY *r); @@ -236,14 +236,15 @@ extern void newrayxf(RAY *r); extern void flipsurface(RAY *r); extern int localhit(RAY *r, CUBE *scene); /* defined in renderopts.c */ +extern int feature_status(int ac, char *av[]); extern int getrenderopt(int ac, char *av[]); extern void print_rdefaults(void); /* defined in srcdraw.c */ extern void drawsources(COLOR *pic[], float *zbf[], int x0, int xsiz, int y0, int ysiz); -extern void init_drawsources(int rad); +extern void init_drawsources(int rad); /* defined in rt/initotypes.c */ -extern void initotypes(void); +extern void initotypes(void); /* module main procedures */ extern void rtrace(char *fname, int nproc); extern char *formstr(int f);