| 1 |
< |
/* Copyright (c) 1990 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 164 |
|
if (source[sn].sflags & SDISTANT) { |
| 165 |
|
if (source[sn].sflags & SSPOT) { /* check location */ |
| 166 |
|
for (i = 0; i < 3; i++) |
| 167 |
< |
vd[i] = sr->rorg[i] - source[sn].sl.s->aim[i]; |
| 167 |
> |
vd[i] = source[sn].sl.s->aim[i] - sr->rorg[i]; |
| 168 |
|
d = DOT(sr->rdir,vd); |
| 169 |
+ |
if (d <= FTINY) |
| 170 |
+ |
return(0.0); |
| 171 |
|
d = DOT(vd,vd) - d*d; |
| 172 |
|
if (PI*d > source[sn].sl.s->siz) |
| 173 |
|
return(0.0); |
| 247 |
|
int (*f)(); /* direct component coefficient function */ |
| 248 |
|
char *p; /* data for f */ |
| 249 |
|
{ |
| 250 |
+ |
extern int (*trace)(); |
| 251 |
|
extern double pow(); |
| 252 |
|
register int sn; |
| 253 |
|
int nshadcheck, ncnts; |
| 317 |
|
source[cntord[sn].sno].sflags & SFOLLOW )) { |
| 318 |
|
/* follow entire path */ |
| 319 |
|
raycont(&sr); |
| 320 |
+ |
if (trace != NULL) |
| 321 |
+ |
(*trace)(&sr); /* trace execution */ |
| 322 |
|
if (bright(sr.rcol) <= FTINY) |
| 323 |
|
continue; /* missed! */ |
| 324 |
|
copycolor(srccnt[cntord[sn].sno].val, sr.rcol); |