ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/srcobstr.c
(Generate patch)

Comparing ray/src/rt/srcobstr.c (file contents):
Revision 2.9 by greg, Fri Sep 10 16:05:07 2004 UTC vs.
Revision 2.11 by greg, Mon Oct 25 17:07:35 2004 UTC

# Line 290 | Line 290 | srcblocker(register RAY *r)
290          if (r->robj == OVOID || objptr(r->robj) != r->ro ||
291                          isvolume(r->ro->otype))
292                  return(0);              /* don't record complex blockers */
293 +        if (r->rsrc < 0 || source[r->rsrc].so == r->ro)
294 +                return(0);              /* just a mistake, that's all */
295          m = findmaterial(r->ro);
296          if (m == NULL)
297                  return(0);              /* no material?! */
# Line 308 | Line 310 | srcblocked(RAY *r)
310  
311          if (obs == OVOID)
312                  return(0);
313 <        op = objptr(obs);               /* check for intersection */
313 >        op = objptr(obs);               /* check blocker intersection */
314          if (!(*ofun[op->otype].funp)(op, r))
315                  return(0);
316 <        op = source[r->rsrc].so;        /* check source really obstructed */
317 <        if ((*ofun[op->otype].funp)(op, r)) {
318 <                rayclear(r);            /* actually, source in front! */
319 <                return(0);
320 <        }
321 <        return(1);                      /* source truly blocked */
316 >        if (source[r->rsrc].sflags & SDISTANT)
317 >                return(1);
318 >        op = source[r->rsrc].so;        /* check source intersection */
319 >        if (!(*ofun[op->otype].funp)(op, r))
320 >                return(1);
321 >        rayclear(r);
322 >        return(0);                      /* source in front */
323   }
324  
325  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines