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

Comparing ray/src/gen/mkillum2.c (file contents):
Revision 1.11 by greg, Thu Aug 22 12:12:23 1991 UTC vs.
Revision 1.12 by greg, Fri Aug 23 12:30:33 1991 UTC

# Line 116 | Line 116 | char  *nm;
116                  }
117          rayflush(rt);
118                                  /* write out the face and its distribution */
119 <        average(il, distarr, nalt*nazi);
120 <        if (il->sampdens > 0)
121 <                flatout(il, distarr, nalt, nazi, u, v, fa->norm);
122 <        illumout(il, ob);
119 >        if (average(il, distarr, nalt*nazi)) {
120 >                if (il->sampdens > 0)
121 >                        flatout(il, distarr, nalt, nazi, u, v, fa->norm);
122 >                illumout(il, ob);
123 >        } else if (!(il->flags & IL_LIGHT))
124 >                printobj(il->altmat, ob);
125                                  /* clean up */
126          freeface(ob);
127          free((char *)distarr);
# Line 183 | Line 185 | char  *nm;
185                  }
186          rayflush(rt);
187                                  /* write out the sphere and its distribution */
188 <        average(il, distarr, nalt*nazi);
189 <        if (il->sampdens > 0)
190 <                roundout(il, distarr, nalt, nazi);
191 <        else
192 <                objerror(ob, WARNING, "diffuse distribution");
193 <        illumout(il, ob);
188 >        if (average(il, distarr, nalt*nazi)) {
189 >                if (il->sampdens > 0)
190 >                        roundout(il, distarr, nalt, nazi);
191 >                else
192 >                        objerror(ob, WARNING, "diffuse distribution");
193 >                illumout(il, ob);
194 >        } else if (!(il->flags & IL_LIGHT))
195 >                printobj(il->altmat, ob);
196                                  /* clean up */
197          free((char *)distarr);
198   }
# Line 251 | Line 255 | char  *nm;
255                  }
256          rayflush(rt);
257                                  /* write out the ring and its distribution */
258 <        average(il, distarr, nalt*nazi);
259 <        if (il->sampdens > 0)
260 <                flatout(il, distarr, nalt, nazi, u, v, co->ad);
261 <        illumout(il, ob);
258 >        if (average(il, distarr, nalt*nazi)) {
259 >                if (il->sampdens > 0)
260 >                        flatout(il, distarr, nalt, nazi, u, v, co->ad);
261 >                illumout(il, ob);
262 >        } else if (!(il->flags & IL_LIGHT))
263 >                printobj(il->altmat, ob);
264                                  /* clean up */
265          freecone(ob);
266          free((char *)distarr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines