10 |
|
|
11 |
|
#define SDISTANT 01 /* source distant flag */ |
12 |
|
#define SSKIP 02 /* source skip flag */ |
13 |
+ |
#define SPROX 04 /* source proximity flag */ |
14 |
+ |
#define SSPOT 010 /* source spotlight flag */ |
15 |
|
|
16 |
|
typedef struct { |
17 |
+ |
float siz; /* output solid angle */ |
18 |
+ |
float flen; /* focal length */ |
19 |
+ |
FVECT aim; /* aim direction */ |
20 |
+ |
} SPOT; /* spotlight */ |
21 |
+ |
|
22 |
+ |
typedef struct { |
23 |
|
short sflags; /* source flags */ |
24 |
|
FVECT sloc; /* direction or position of source */ |
25 |
|
float ss; /* tangent or disk radius */ |
26 |
|
float ss2; /* domega or projected area */ |
27 |
+ |
union { |
28 |
+ |
float prox; /* proximity */ |
29 |
+ |
SPOT *s; /* spot */ |
30 |
+ |
} sl; /* localized source information */ |
31 |
|
long ntests, nhits; /* shadow tests and hits */ |
32 |
|
OBJREC *so; /* source object */ |
33 |
|
} SRCREC; /* light source */ |
44 |
|
extern int nsources; /* the number of sources */ |
45 |
|
|
46 |
|
extern double srcray(); /* ray to source */ |
47 |
+ |
|
48 |
+ |
extern SPOT *makespot(); /* make spotlight */ |