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

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.15 by gregl, Tue Dec 2 12:29:17 1997 UTC vs.
Revision 3.16 by gregl, Thu Dec 4 10:30:33 1997 UTC

# Line 363 | Line 363 | register HDGRID        *gp;
363          if (gp == NULL)         /* already initialized? */
364                  return;
365                                  /* set grid parameters */
366 +        gp->grid[0] = gp->grid[1] = gp->grid[2] = 0;
367          if (sscanf(vval(SECTION),
368 <                        "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf",
368 >                "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %hd %hd %hd",
369                          &gp->orig[0], &gp->orig[1], &gp->orig[2],
370                          &gp->xv[0][0], &gp->xv[0][1], &gp->xv[0][2],
371                          &gp->xv[1][0], &gp->xv[1][1], &gp->xv[1][2],
372 <                        &gp->xv[2][0], &gp->xv[2][1], &gp->xv[2][2]) != 12)
372 >                        &gp->xv[2][0], &gp->xv[2][1], &gp->xv[2][2],
373 >                        &gp->grid[0], &gp->grid[1], &gp->grid[2]) < 12)
374                  badvalue(SECTION);
375          maxlen = 0.;
376          for (i = 0; i < 3; i++)
# Line 382 | Line 384 | register HDGRID        *gp;
384          if ((d = vflt(GRID)) <= FTINY)
385                  badvalue(GRID);
386          for (i = 0; i < 3; i++)
387 <                gp->grid[i] = len[i]/d + (1.-FTINY);
387 >                if (gp->grid[i] <= 0)
388 >                        gp->grid[i] = len[i]/d + (1.-FTINY);
389   }
390  
391  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines