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

Comparing ray/src/px/pcomb.c (file contents):
Revision 2.34 by greg, Tue Aug 31 18:52:27 2004 UTC vs.
Revision 2.35 by greg, Mon Jan 24 19:29:39 2005 UTC

# Line 601 | Line 601 | l_psize(char *nm)              /* compute pixel size in steradians
601                  if (input[fn].vw.type == 0)
602                          errno = EDOM;
603                  else if (input[fn].vw.type != VT_PAR &&
604 <                                funvalue(vray[6], 1, &d) >= 0) {
604 >                                funvalue(vray[6], 1, &d) > FTINY) {
605                          for (i = 0; i < 3; i++)
606                                  dir0[i] = funvalue(vray[3+i], 1, &d);
607                          pix2loc(locx, &input[fn].rs, xscan+1, ymax-1-yscan);
608                          pix2loc(locy, &input[fn].rs, xscan, ymax-yscan);
609                          if (viewray(org, dirx, &input[fn].vw,
610 <                                        locx[0], locx[1]) >= 0 &&
610 >                                        locx[0], locx[1]) >= -FTINY &&
611                                          viewray(org, diry, &input[fn].vw,
612 <                                        locy[0], locy[1]) >= 0) {
612 >                                        locy[0], locy[1]) >= -FTINY) {
613                                                  /* approximate solid angle */
614                                  for (i = 0; i < 3; i++) {
615                                          dirx[i] -= dir0[i];
616                                          diry[i] -= dir0[i];
617                                  }
618                                  fcross(dir0, dirx, diry);
619 <                                psize[fn] = sqrt(DOT(dir0,dir0));
619 >                                psize[fn] = VLEN(dir0);
620                          }
621                  }
622                  ltick[fn] = eclock;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines