26 |
|
#define SSPOT 010 /* source spotlight flag */ |
27 |
|
#define SVIRTUAL 020 /* source virtual flag */ |
28 |
|
#define SFLAT 040 /* source flat flag */ |
29 |
< |
#define SCYL 0100 /* source cylindrical flag */ |
30 |
< |
#define SFOLLOW 0200 /* source follow path flag */ |
29 |
> |
#define SCIR 0100 /* source circular flag */ |
30 |
> |
#define SCYL 0200 /* source cylindrical flag */ |
31 |
> |
#define SFOLLOW 0400 /* source follow path flag */ |
32 |
|
|
33 |
|
typedef struct { |
34 |
|
FVECT aim; /* aim direction or center */ |
51 |
|
} OBSCACHE; /* obstructor cache */ |
52 |
|
|
53 |
|
typedef struct { |
53 |
– |
int sflags; /* source flags */ |
54 |
|
FVECT sloc; /* direction or position of source */ |
55 |
|
FVECT ss[3]; /* source dimension vectors, U, V, and W */ |
56 |
|
float srad; /* maximum source radius */ |
72 |
|
#ifdef SHADCACHE |
73 |
|
OBSCACHE *obscache; /* obstructor cache */ |
74 |
|
#endif |
75 |
+ |
int sflags; /* source flags */ |
76 |
|
} SRCREC; /* light source */ |
77 |
|
|
78 |
|
#define MAXSPART 64 /* maximum partitions per source */ |
85 |
|
#define snorm ss[SW] /* normal vector for flat source */ |
86 |
|
|
87 |
|
typedef struct { |
88 |
+ |
double dom; /* solid angle of partition */ |
89 |
|
int sn; /* source number */ |
90 |
|
short np; /* number of partitions */ |
91 |
|
short sp; /* this partition number */ |
90 |
– |
double dom; /* solid angle of partition */ |
92 |
|
unsigned char spt[MAXSPART/2]; /* source partitioning */ |
93 |
|
} SRCINDEX; /* source index structure */ |
94 |
|
|
153 |
|
extern void direct(RAY *r, srcdirf_t *f, void *p); |
154 |
|
extern void srcscatter(RAY *r); |
155 |
|
extern int m_light(OBJREC *m, RAY *r); |
156 |
+ |
/* defined in srcobstr.c */ |
157 |
+ |
extern void initobscache(int sn); |
158 |
|
extern int srcblocker(RAY *r); |
159 |
|
extern int srcblocked(RAY *r); |
160 |
|
extern void freeobscache(SRCREC *s); |
161 |
+ |
extern void markclip(OBJREC *m); |
162 |
|
/* defined in srcsamp.c */ |
163 |
|
extern double nextssamp(RAY *r, SRCINDEX *si); |
164 |
|
extern int skipparts(int ct[3], int sz[3], int pp[2], unsigned char *pt); |