1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1995 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
119 |
|
} |
120 |
|
src->srad = sqrt(src->srad); |
121 |
|
/* compute size vectors */ |
122 |
< |
if (f->nv == 4 || (f->nv == 5 && /* parallelogram case */ |
123 |
< |
dist2(VERTEX(f,0),VERTEX(f,4)) <= FTINY*FTINY)) |
122 |
> |
if (f->nv == 4) /* parallelogram case */ |
123 |
|
for (j = 0; j < 3; j++) { |
124 |
|
src->ss[SU][j] = .5*(VERTEX(f,1)[j]-VERTEX(f,0)[j]); |
125 |
|
src->ss[SV][j] = .5*(VERTEX(f,3)[j]-VERTEX(f,0)[j]); |
251 |
|
} |
252 |
|
|
253 |
|
|
254 |
< |
spotout(r, s, dist) /* check if we're outside spot region */ |
254 |
> |
spotout(r, s) /* check if we're outside spot region */ |
255 |
|
register RAY *r; |
256 |
|
register SPOT *s; |
258 |
– |
int dist; |
257 |
|
{ |
258 |
|
double d; |
259 |
|
FVECT vd; |
260 |
|
|
261 |
|
if (s == NULL) |
262 |
|
return(0); |
263 |
< |
if (dist) { /* distant source */ |
263 |
> |
if (s->flen < -FTINY) { /* distant source */ |
264 |
|
vd[0] = s->aim[0] - r->rorg[0]; |
265 |
|
vd[1] = s->aim[1] - r->rorg[1]; |
266 |
|
vd[2] = s->aim[2] - r->rorg[2]; |