| 22 |
|
|
| 23 |
|
long nrays = 0L; /* number of rays traced */ |
| 24 |
|
|
| 25 |
< |
#define MAXLOOP 1024 /* modifier loop detection */ |
| 25 |
> |
#define MAXLOOP 128 /* modifier loop detection */ |
| 26 |
|
|
| 27 |
|
#define RAYHIT (-1) /* return value for intercepted ray */ |
| 28 |
|
|
| 68 |
|
{ |
| 69 |
|
extern int (*trace)(); |
| 70 |
|
|
| 71 |
< |
if (localhit(r, &thescene)) |
| 71 |
> |
if (localhit(r, &thescene) || sourcehit(r)) |
| 72 |
> |
/* check for clipped object */ |
| 73 |
|
if (r->clipset != NULL && inset(r->clipset, r->ro->omod)) |
| 74 |
< |
raytrans(r); /* object is clipped */ |
| 74 |
> |
raytrans(r); |
| 75 |
|
else |
| 76 |
|
rayshade(r, r->ro->omod); |
| 76 |
– |
else if (sourcehit(r)) |
| 77 |
– |
rayshade(r, r->ro->omod); |
| 77 |
|
|
| 78 |
|
if (trace != NULL) |
| 79 |
|
(*trace)(r); /* trace execution */ |