--- ray/src/rt/source.h 2004/09/08 17:10:16 2.15 +++ ray/src/rt/source.h 2007/07/25 05:38:24 2.17 @@ -1,4 +1,4 @@ -/* RCSid $Id: source.h,v 2.15 2004/09/08 17:10:16 greg Exp $ */ +/* RCSid $Id: source.h,v 2.17 2007/07/25 05:38:24 greg Exp $ */ /* * source.h - header file for ray tracing sources. * @@ -50,7 +50,6 @@ typedef struct { } OBSCACHE; /* obstructor cache */ typedef struct { - int sflags; /* source flags */ FVECT sloc; /* direction or position of source */ FVECT ss[3]; /* source dimension vectors, U, V, and W */ float srad; /* maximum source radius */ @@ -72,6 +71,7 @@ typedef struct { #ifdef SHADCACHE OBSCACHE *obscache; /* obstructor cache */ #endif + int sflags; /* source flags */ } SRCREC; /* light source */ #define MAXSPART 64 /* maximum partitions per source */ @@ -84,10 +84,10 @@ typedef struct { #define snorm ss[SW] /* normal vector for flat source */ typedef struct { + double dom; /* solid angle of partition */ int sn; /* source number */ short np; /* number of partitions */ short sp; /* this partition number */ - double dom; /* solid angle of partition */ unsigned char spt[MAXSPART/2]; /* source partitioning */ } SRCINDEX; /* source index structure */ @@ -152,10 +152,12 @@ typedef void srcdirf_t(COLOR cv, void *np, FVECT ldir, extern void direct(RAY *r, srcdirf_t *f, void *p); extern void srcscatter(RAY *r); extern int m_light(OBJREC *m, RAY *r); + /* defined in srcobstr.c */ extern void initobscache(int sn); extern int srcblocker(RAY *r); extern int srcblocked(RAY *r); extern void freeobscache(SRCREC *s); +extern void markclip(OBJREC *m); /* defined in srcsamp.c */ extern double nextssamp(RAY *r, SRCINDEX *si); extern int skipparts(int ct[3], int sz[3], int pp[2], unsigned char *pt);