--- ray/src/rt/ray.h 2005/09/23 19:04:53 2.29 +++ ray/src/rt/ray.h 2009/12/15 18:21:53 2.33 @@ -1,4 +1,4 @@ -/* RCSid $Id: ray.h,v 2.29 2005/09/23 19:04:53 greg Exp $ */ +/* RCSid $Id: ray.h,v 2.33 2009/12/15 18:21:53 greg Exp $ */ /* * ray.h - header file for routines using rays. */ @@ -14,6 +14,10 @@ extern "C" { #endif +#ifndef RNUMBER +#define RNUMBER unsigned long /* ray counter (>= sizeof pointer) */ +#endif + #define MAXDIM 32 /* maximum number of dimensions */ /* ray type flags */ @@ -50,7 +54,7 @@ typedef struct ray { OBJREC *ro; /* intersected object (one with material) */ FULLXF *rox; /* object transformation */ int *slights; /* list of lights to test for scattering */ - unsigned long rno; /* unique ray number */ + RNUMBER rno; /* unique ray number */ int rlvl; /* number of reflections for this ray */ int rsrc; /* source we're aiming for */ float rweight; /* cumulative weight (for termination) */ @@ -191,12 +195,16 @@ extern void ray_restore(RAYPARAMS *rp); extern void ray_defaults(RAYPARAMS *rp); /* defined in raypcalls.c */ extern void ray_pinit(char *otnm, int nproc); -extern void ray_psend(RAY *r); +extern int ray_psend(RAY *r); extern int ray_pqueue(RAY *r); extern int ray_presult(RAY *r, int poll); extern void ray_pdone(int freall); extern void ray_popen(int nadd); extern void ray_pclose(int nsub); + /* defined in ray_fifo.c */ +extern int (*ray_fifo_out)(RAY *r); +extern int ray_fifo_in(RAY *r); +extern int ray_fifo_flush(void); /* defined in raytrace.c */ extern int rayorigin(RAY *r, int rt, const RAY *ro, const COLOR rc); extern void rayclear(RAY *r); @@ -224,8 +232,8 @@ extern void init_drawsources(int rad); /* defined in rt/initotypes.c */ extern void initotypes(void); /* module main procedures */ -extern void rtrace(char *fname); -extern char * formstr(int f); +extern void rtrace(char *fname, int nproc); +extern char *formstr(int f); extern void rview(void); extern void rpict(int seq, char *pout, char *zout, char *prvr);