--- ray/src/rt/source.h 2024/11/15 20:47:42 2.26 +++ ray/src/rt/source.h 2025/10/22 16:39:58 2.28 @@ -1,4 +1,4 @@ -/* RCSid $Id: source.h,v 2.26 2024/11/15 20:47:42 greg Exp $ */ +/* RCSid $Id: source.h,v 2.28 2025/10/22 16:39:58 greg Exp $ */ /* * source.h - header file for ray tracing sources. * @@ -117,16 +117,16 @@ typedef struct { * i passed to vproj runs from 0 to nproj-1. */ -typedef struct { - int (*vproj)(); /* project virtual sources */ +typedef struct { /* project virtual sources */ + int (*vproj)(MAT4,OBJREC*,SRCREC*,int); int nproj; /* number of possible projections */ } VSMATERIAL; /* virtual source material functions */ typedef struct { - void (*setsrc)(); /* set light source for object */ - void (*partit)(); /* partition light source object */ - double (*getpleq)(); /* plane equation for surface */ - double (*getdisk)(); /* maximum disk for surface */ + void (*setsrc)(SRCREC*,OBJREC*); /* set light source for object */ + void (*partit)(SRCINDEX*,RAY*); /* partition light source object */ + double (*getpleq)(FVECT,OBJREC*); /* plane equation for surface */ + double (*getdisk)(FVECT,OBJREC*); /* maximum disk for surface */ } SOBJECT; /* source object functions */ typedef union { @@ -145,19 +145,6 @@ extern int nsources; /* the number of sources */ #define getmaxdisk(c,o) (*sfun[(o)->otype].of->getdisk)(c,o) #define setsource(s,o) (*sfun[(o)->otype].of->setsrc)(s,o) -#define SSKIPFLSIZ ((nsources+7) >> 3) - -extern uby8 *ssf_select; /* sources we may skip */ - -#define sskip_new() ((uby8 *)ecalloc(1,SSKIPFLSIZ)) -#define sskip_free(fl) (efree(fl), fl=NULL) -#define sskip_eq(fl1,fl2) !memcmp(fl1, fl2, SSKIPFLSIZ) -#define sskip_cpy(dfl,sfl) memcpy(dfl,sfl,SSKIPFLSIZ) -#define sskip_op(fl,op,sn) ((fl)[(sn)>>3] op (1<<((sn)&7))) -#define sskip_chk(fl,sn) sskip_op(fl,&,sn) -#define sskip_set(fl,sn) sskip_op(fl,|=,sn) -#define sskip_clr(fl,sn) sskip_op(fl,&=~,sn) - /* defined in source.c */ extern void marksources(void); extern void distantsources(void); @@ -176,9 +163,6 @@ extern int srcblocked(RAY *r); extern void freeobscache(SRCREC *s); extern void markclip(OBJREC *m); /* defined in srcsamp.c */ -extern int sskip_rsi(uby8 *flags); -extern uby8 *sskip_flags(int rsi); -extern void sskip_addflags(uby8 *dfl, const uby8 *sfl); extern int srcskip(int sn, RAY *r); extern double nextssamp(RAY *r, SRCINDEX *si); extern int skipparts(int ct[3], int sz[3], int pp[2], unsigned char *pt);