311 |
|
/* compute image polygon for source */ |
312 |
|
if (!(nsv = sourcepoly(vw, sn, spoly))) |
313 |
|
continue; |
314 |
+ |
/* big enough for standard sampling? */ |
315 |
+ |
if (minw2(spoly, nsv, vw->vn2/vw->hn2) > (double)rad*rad/xr/xr) |
316 |
+ |
continue; |
317 |
|
/* clip source poly to subimage */ |
318 |
|
nsv = box_clip_poly(spoly, nsv, |
319 |
|
(double)x0/xr, (double)(x0+xsiz)/xr, |
320 |
|
(double)y0/yr, (double)(y0+ysiz)/yr, spoly); |
321 |
|
if (!nsv) |
322 |
|
continue; |
320 |
– |
/* is it big so sampling found it? */ |
321 |
– |
if (minw2(spoly, nsv, vw->vn2/vw->hn2) > (double)rad*rad/xr/xr) |
322 |
– |
continue; |
323 |
|
/* find common subimage (BBox) */ |
324 |
|
xmin = x0 + xsiz; xmax = x0; |
325 |
|
ymin = y0 + ysiz; ymax = y0; |
347 |
|
cxy[0], cxy[1])) < -FTINY) |
348 |
|
continue; /* not in view */ |
349 |
|
if (source[sn].sflags & SSPOT && |
350 |
< |
spotout(sr, source[sn].sl.s)) |
350 |
> |
spotout(&sr, source[sn].sl.s)) |
351 |
|
continue; /* outside spot */ |
352 |
|
rayorigin(&sr, NULL, SHADOW, 1.0); |
353 |
|
sr.rsrc = sn; |