11 |
|
#include "copyright.h" |
12 |
|
|
13 |
|
#include "ray.h" |
14 |
– |
|
14 |
|
#include "otypes.h" |
15 |
< |
|
15 |
> |
#include "otspecial.h" |
16 |
|
#include "source.h" |
18 |
– |
|
17 |
|
#include "random.h" |
18 |
|
|
19 |
|
#define MINSAMPLES 16 /* minimum number of pretest samples */ |
139 |
|
OBJREC *m; |
140 |
|
|
141 |
|
i = o->omod; |
142 |
< |
m = findmaterial(objptr(i)); |
142 |
> |
m = findmaterial(o); |
143 |
|
if (m == NULL) |
144 |
|
return(objptr(i)); |
145 |
|
if (m->otype != MAT_ILLUM || m->oargs.nsargs < 1 || |
374 |
|
sr.rorg[i] = oc[i] + offsdir[i] + d*onorm[i]; |
375 |
|
sr.rdir[i] = -onorm[i]; |
376 |
|
} |
377 |
+ |
sr.rmax = 0.0; |
378 |
|
rayorigin(&sr, PRIMARY, NULL, NULL); |
379 |
|
} while (!(*ofun[o->otype].funp)(o, &sr)); |
380 |
|
/* check against source */ |