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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.51 by greg, Mon Mar 2 22:00:05 2020 UTC vs.
Revision 2.52 by greg, Mon Sep 7 04:06:17 2020 UTC

# Line 720 | Line 720 | sample_origin(PARAMS *p, FVECT orig, const FVECT rdir,
720                                          /* compute projected areas */
721          for (i = 0, sp = p->slist; sp != NULL; i++, sp = sp->next) {
722                  projsa[i] = -DOT(sp->snrm, rdir) * sp->area;
723 <                tarea += projsa[i] *= (double)(projsa[i] > FTINY);
723 >                tarea += projsa[i] *= (double)(projsa[i] > 0);
724          }
725 <        if (tarea < 0) {                /* wrong side of sender? */
725 >        if (tarea < FTINY*FTINY) {      /* wrong side of sender? */
726                  fputs(progname, stderr);
727                  fputs(": internal - sample behind all sender elements!\n",
728                                  stderr);
# Line 997 | Line 997 | finish_polygon(SURF *p)
997                  VCOPY(e1, e2);
998          }
999          p->area = normalize(p->snrm)*0.5;
1000 <        return(p->area > FTINY);
1000 >        return(p->area > FTINY*FTINY);
1001   }
1002  
1003   /* Add a surface to our current parameters */
# Line 1060 | Line 1060 | add_surface(int st, const char *oname, FILE *fp)
1060                  snew->area *= PI*snew->area;
1061                  break;
1062          }
1063 <        if ((snew->area <= FTINY) & (verbose >= 0)) {
1063 >        if ((snew->area <= FTINY*FTINY) & (verbose >= 0)) {
1064                  fprintf(stderr, "%s: warning - zero area for surface '%s'\n",
1065                                  progname, oname);
1066                  free(snew);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines