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

Comparing ray/src/rt/source.c (file contents):
Revision 2.40 by greg, Wed Dec 31 19:38:27 2003 UTC vs.
Revision 2.43 by greg, Mon Mar 1 18:11:20 2004 UTC

# Line 83 | Line 83 | marksources()                  /* find and mark source objects */
83                  if (!issurface(o->otype) || o->omod == OVOID)
84                          continue;
85                                          /* find material */
86 <                m = findmaterial(o);
86 >                m = findmaterial(objptr(o->omod));
87                  if (m == NULL || !islight(m->otype))
88                          continue;       /* not source modifier */
89          
# Line 415 | Line 415 | char  *p                       /* data for f */
415                          if (bright(sr.rcol) <= FTINY) {
416   #if SHADCACHE
417                                  if ((scp <= srccnt || scp[-1].sno != scp->sno)
418 <                                                && (scp >= srccnt+ncnts ||
418 >                                                && (scp >= srccnt+ncnts-1 ||
419                                                      scp[1].sno != scp->sno))
420                                          srcblocker(&sr);
421   #endif
# Line 544 | Line 544 | register RAY  *r
544   */
545  
546   static int
547 < weaksrcmat(int obj)             /* identify material */
547 > weaksrcmat(OBJECT obj)          /* identify material */
548   {
549 <        register OBJREC *o = objptr(obj);
549 >        OBJREC *o = findmaterial(objptr(obj));
550          
551 <        while (!ismaterial(o->otype))   /* find material */
552 <                o = objptr(o->omod);
551 >        if (o == NULL) return 0;
552          return((o->otype==MAT_ILLUM)|(o->otype==MAT_GLOW));
553   }
554  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines