--- ray/src/rt/ray.h 2019/07/25 16:50:54 2.41 +++ ray/src/rt/ray.h 2021/01/31 18:08:04 2.45 @@ -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.45 2021/01/31 18:08:04 greg Exp $ */ /* * ray.h - header file for routines using rays. */ @@ -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; @@ -221,6 +221,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);