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 2.36 by greg, Mon Aug 15 19:48:06 2011 UTC vs.
Revision 2.37 by greg, Tue Aug 16 18:09:53 2011 UTC

# Line 123 | Line 123 | srcsamps(                      /* sample sources from this surface positi
123          MAT4 ixfm
124   )
125   {
126 <        int  nalt, nazi;
126 >        int  nalt=1, nazi=1;
127          SRCINDEX  si;
128          RAY  sr;
129          FVECT   v;
130          double  d;
131          int  i, j;
132                                                  /* get sampling density */
133 <        if (il->sampdens <= 0) {
134 <                nalt = nazi = 1;
135 <        } else {
133 >        if (il->sd == NULL && il->sampdens > 0) {
134                  i = PI * il->sampdens;
135                  nalt = sqrt(i/PI) + .5;
136                  nazi = PI*nalt + .5;
# Line 156 | Line 154 | srcsamps(                      /* sample sources from this surface positi
154                          d = -1.0001*il->thick - 5.*FTINY;
155                  else
156                          d = 5.*FTINY;
157 <                for (i = 3; i--; )
160 <                        sr.rorg[i] += d*nrm[i];
157 >                VSUM(sr.rorg, sr.rorg, nrm, d);
158                  samplendx++;                    /* increment sample counter */
159                  if (!srcray(&sr, NULL, &si))
160                          break;                  /* end of sources */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines