--- ray/src/gen/mkillum.h 2004/09/17 21:43:50 2.7 +++ ray/src/gen/mkillum.h 2012/10/13 20:15:43 2.19 @@ -1,13 +1,13 @@ -/* RCSid: $Id: mkillum.h,v 2.7 2004/09/17 21:43:50 greg Exp $ */ +/* RCSid: $Id: mkillum.h,v 2.19 2012/10/13 20:15:43 greg Exp $ */ /* * Common definitions for mkillum */ #ifndef _RAD_MKILLUM_H_ #define _RAD_MKILLUM_H_ -#include "standard.h" -#include "object.h" -#include "rtprocess.h" +#include "ray.h" +#include "otypes.h" +#include "random.h" #ifdef __cplusplus extern "C" { @@ -20,6 +20,7 @@ extern "C" { struct illum_args { int flags; /* flags from list above */ + double thick; /* object thickness */ char matname[MAXSTR]; /* illum material name */ char datafile[MAXSTR]; /* distribution data file name */ int dfnum; /* data file number */ @@ -27,43 +28,33 @@ struct illum_args { int sampdens; /* point sample density */ int nsamps; /* # of samples in each direction */ float minbrt; /* minimum average brightness */ - float col[3]; /* computed average color */ + COLOR col; /* computed average color */ }; /* illum options */ -struct rtproc { - struct rtproc *next; /* next in list of processes */ - SUBPROC pd; /* rtrace pipe descriptors */ - float *buf; /* rtrace i/o buffer */ - int bsiz; /* maximum rays for rtrace buffer */ - float **dest; /* destination for each ray result */ - int nrays; /* current length of rtrace buffer */ -}; /* rtrace process */ +extern void printobj(char *mod, OBJREC *obj); +extern int average(struct illum_args *il, COLORV *da, int n); +extern void flatout(struct illum_args *il, COLORV *da, int n, int m, + FVECT u, FVECT v, FVECT w); +extern void illumout(struct illum_args *il, OBJREC *ob); +extern void roundout(struct illum_args *il, COLORV *da, int n, int m); -extern void printobj(char *mod, register OBJREC *obj); -extern int average(register struct illum_args *il, float *da, int n); -extern void flatout(struct illum_args *il, float *da, int n, int m, - FVECT u, FVECT v, FVECT w); -extern void illumout(register struct illum_args *il, OBJREC *ob); -extern void roundout(struct illum_args *il, float *da, int n, int m); +extern void newdist(int siz); +extern int process_ray(RAY *r, int rv); +extern void raysamp(int ndx, FVECT org, FVECT dir); +extern void rayclean(void); -/* The header file otypes.h has to follow definition of our struct's */ -#define FUN_ARGLIST OBJREC *, struct illum_args *, struct rtproc *, char * -#ifdef __cplusplus -} -#include "otypes.h" -extern "C" { -#else -#include "otypes.h" -#endif +extern void flatdir(FVECT dv, double alt, double azi); +extern int flatindex(FVECT dv, int nalt, int nazi); -extern int o_default(FUN_ARGLIST); -extern int o_face(FUN_ARGLIST); -extern int o_sphere(FUN_ARGLIST); -extern int o_ring(FUN_ARGLIST); -extern void raysamp(float res[3], FVECT org, FVECT dir, struct rtproc *rt0); -extern void rayflush(struct rtproc *rt, int doall); -extern struct rtproc *raywait(struct rtproc *rt0); +extern int my_default(OBJREC *, struct illum_args *, char *); +extern int my_face(OBJREC *, struct illum_args *, char *); +extern int my_sphere(OBJREC *, struct illum_args *, char *); +extern int my_ring(OBJREC *, struct illum_args *, char *); +extern COLORV * distarr; /* distribution array */ +extern int distsiz; + +extern char *progname; #ifdef __cplusplus }