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

Comparing ray/src/rt/initotypes.c (file contents):
Revision 2.25 by greg, Sat Nov 10 16:12:26 2018 UTC vs.
Revision 2.26 by greg, Thu Apr 18 22:58:03 2019 UTC

# Line 95 | Line 95 | initotypes(void)                       /* initialize ofun array */
95  
96  
97   int
98 < o_default(OBJREC *o, RAY *r)                    /* default action is error */
98 > o_default(OBJREC *o, RAY *r)            /* default action is error */
99   {
100          objerror(o, CONSISTENCY, "unexpected object call");
101 <                                /* unused call to load freeobjmem.o */
101 >                                        /* unused call to load freeobjmem.o */
102          free_objs(0, 0);
103          return(0);
104   }
105  
106  
107 <
108 < OBJREC *                        /* find an object's actual material */
109 < findmaterial(OBJREC *o)
107 > OBJREC *        
108 > findmaterial(OBJREC *o)                 /* find an object's actual material */
109   {
110          while (!ismaterial(o->otype)) {
111                  if (o->otype == MOD_ALIAS && o->oargs.nsargs) {
# Line 115 | Line 114 | findmaterial(OBJREC *o)
114                          aobj = lastmod(objndx(o), o->oargs.sarg[0]);
115                          if (aobj < 0)
116                                  objerror(o, USER, "bad reference");
117 <                                /* recursive check on alias branch */
117 >                                        /* recursive check on alias branch */
118                          if ((ao = findmaterial(objptr(aobj))) != NULL)
119                                  return(ao);
120                  }
121                  if (o->omod == OVOID) {
122 <                                /* assume unmodified mixture is material */
122 >                                        /* void mixture de facto material? */
123                          if (ismixture(o->otype))
124                                  break;
125 <                        return(NULL);
125 >                        return(NULL);   /* else no material found */
126                  }
127                  o = objptr(o->omod);
128          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines