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.75 by greg, Mon Jan 4 19:07:15 2021 UTC vs.
Revision 2.76 by greg, Mon Feb 1 16:19:49 2021 UTC

# Line 60 | Line 60 | marksources(void)                      /* find and mark source objects */
60                  if (!issurface(o->otype) || o->omod == OVOID)
61                          continue;
62                                          /* find material */
63 <                m = findmaterial(objptr(o->omod));
63 >                m = findmaterial(o);
64                  if (m == NULL)
65                          continue;
66                  if (m->otype == MAT_CLIP) {
# Line 154 | Line 154 | distantsources(void)                   /* only mark distant sources */
154                  if ((o->otype != OBJ_SOURCE) | (o->omod == OVOID))
155                          continue;
156                                          /* find material */
157 <                m = findmaterial(objptr(o->omod));
157 >                m = findmaterial(o);
158                  if (m == NULL)
159                          continue;
160                  if (!islight(m->otype))
# Line 294 | Line 294 | nomat:
294  
295   static int
296   transillum(                     /* check if material is transparent illum */
297 <        OBJECT  obj
297 >        OBJREC *m
298   )
299   {
300 <        OBJREC *m = findmaterial(objptr(obj));
301 <        
300 >        m = findmaterial(m);
301          if (m == NULL)
302                  return(1);
303          if (m->otype != MAT_ILLUM)
# Line 344 | Line 343 | sourcehit(                     /* check to see if ray hit distant source
343                                  glowsrc = i;
344                          continue;
345                  }
346 <                if (transillum(source[i].so->omod)) {
346 >                if (transillum(source[i].so)) {
347                          if (transrc < 0)
348                                  transrc = i;
349                          continue;
# Line 664 | Line 663 | srcscatter(                    /* compute source scattering into ray */
663   */
664  
665   static int
666 < weaksrcmat(OBJECT obj)          /* identify material */
666 > weaksrcmat(OBJREC *m)           /* identify material */
667   {
668 <        OBJREC *m = findmaterial(objptr(obj));
670 <        
668 >        m = findmaterial(m);
669          if (m == NULL) return(0);
670          return((m->otype==MAT_ILLUM) | (m->otype==MAT_GLOW));
671   }
672  
673   #define  illumblock(m, r)       (!(source[r->rsrc].sflags&SVIRTUAL) && \
674                                  r->rod > 0.0 && \
675 <                                weaksrcmat(source[r->rsrc].so->omod))
675 >                                weaksrcmat(source[r->rsrc].so))
676  
677   /* wrongsource *
678   *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines