8 |
|
#include "copyright.h" |
9 |
|
|
10 |
|
#include "ray.h" |
11 |
< |
|
11 |
> |
#include "ambient.h" |
12 |
|
#include "data.h" |
13 |
< |
|
13 |
> |
#include "source.h" |
14 |
|
#include "otypes.h" |
15 |
< |
|
15 |
> |
#include "rtotypes.h" |
16 |
|
#include "func.h" |
17 |
|
|
18 |
|
/* |
77 |
|
} BRDFDAT; /* BRDF material data */ |
78 |
|
|
79 |
|
|
80 |
+ |
static srcdirf_t dirbrdf; |
81 |
+ |
static int setbrdfunc(BRDFDAT *np); |
82 |
+ |
|
83 |
+ |
|
84 |
|
static void |
85 |
< |
dirbrdf(cval, np, ldir, omega) /* compute source contribution */ |
86 |
< |
COLOR cval; /* returned coefficient */ |
87 |
< |
register BRDFDAT *np; /* material data */ |
88 |
< |
FVECT ldir; /* light source direction */ |
89 |
< |
double omega; /* light source size */ |
85 |
> |
dirbrdf( /* compute source contribution */ |
86 |
> |
COLOR cval, /* returned coefficient */ |
87 |
> |
void *nnp, /* material data */ |
88 |
> |
FVECT ldir, /* light source direction */ |
89 |
> |
double omega /* light source size */ |
90 |
> |
) |
91 |
|
{ |
92 |
+ |
register BRDFDAT *np = nnp; |
93 |
|
double ldot; |
94 |
|
double dtmp; |
95 |
|
COLOR ctmp; |
195 |
|
} |
196 |
|
|
197 |
|
|
198 |
< |
int |
199 |
< |
m_brdf(m, r) /* color a ray that hit a BRDTfunc material */ |
200 |
< |
register OBJREC *m; |
201 |
< |
register RAY *r; |
198 |
> |
extern int |
199 |
> |
m_brdf( /* color a ray that hit a BRDTfunc material */ |
200 |
> |
register OBJREC *m, |
201 |
> |
register RAY *r |
202 |
> |
) |
203 |
|
{ |
204 |
|
int hitfront = 1; |
205 |
|
BRDFDAT nd; |
329 |
|
|
330 |
|
|
331 |
|
|
332 |
< |
int |
333 |
< |
m_brdf2(m, r) /* color a ray that hit a BRDF material */ |
334 |
< |
register OBJREC *m; |
335 |
< |
register RAY *r; |
332 |
> |
extern int |
333 |
> |
m_brdf2( /* color a ray that hit a BRDF material */ |
334 |
> |
register OBJREC *m, |
335 |
> |
register RAY *r |
336 |
> |
) |
337 |
|
{ |
338 |
|
BRDFDAT nd; |
339 |
|
COLOR ctmp; |
416 |
|
} |
417 |
|
|
418 |
|
|
419 |
< |
int |
420 |
< |
setbrdfunc(np) /* set up brdf function and variables */ |
421 |
< |
register BRDFDAT *np; |
419 |
> |
static int |
420 |
> |
setbrdfunc( /* set up brdf function and variables */ |
421 |
> |
register BRDFDAT *np |
422 |
> |
) |
423 |
|
{ |
424 |
|
FVECT vec; |
425 |
|
|