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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.62 by greg, Mon Oct 20 18:55:19 2025 UTC vs.
Revision 2.63 by greg, Mon Oct 20 19:01:32 2025 UTC

# Line 908 | Line 908 | sample_klems(PARAMS *p, int b, FILE *fp)
908   static int
909   prepare_sampler(PARAMS *p)
910   {
911 <        if (p->slist == NULL) {         /* missing sample surface! */
912 <                error(USER, "no sender surface");
911 >        if (p->slist == NULL) { /* missing sample surface! */
912 >                fputs(progname, stderr);
913 >                fputs(": no sender surface!\n", stderr);
914                  return(-1);
915          }
916                                          /* misplaced output file spec. */
917 <        if (p->outfn[0]) {
918 <                sprintf(errmsg, "ignoring output file in sender ('%s')",
919 <                                p->outfn);
919 <                error(WARNING, errmsg);
920 <        }
917 >        if ((p->outfn != NULL) & !(verbose & NOWARN))
918 >                fprintf(stderr, "%s: warning - ignoring output file in sender ('%s')\n",
919 >                                progname, p->outfn);
920                                          /* check/set basis hemisphere */
921          if (!p->hemis[0]) {
922 <                error(USER, "missing sender sampling type");
922 >                fputs(progname, stderr);
923 >                fputs(": missing sender sampling type!\n", stderr);
924                  return(-1);
925          }
926          if (normalize(p->nrm) == 0) {
927 <                error(USER, "undefined normal for sender sampling");
927 >                fputs(progname, stderr);
928 >                fputs(": undefined normal for sender sampling\n", stderr);
929                  return(-1);
930          }
931          if (normalize(p->vup) == 0) {
# Line 935 | Line 936 | prepare_sampler(PARAMS *p)
936          }
937          fcross(p->udir, p->vup, p->nrm);
938          if (normalize(p->udir) == 0) {
939 <                error(USER, "up vector coincides with sender normal");
939 >                fputs(progname, stderr);
940 >                fputs(": up vector coincides with sender normal\n", stderr);
941                  return(-1);
942          }
943          fcross(p->vdir, p->nrm, p->udir);
944 <        if (p->sign == '-') {           /* left-handed coordinate system? */
944 >        if (p->sign == '-') {   /* left-handed coordinate system? */
945                  p->udir[0] *= -1.;
946                  p->udir[1] *= -1.;
947                  p->udir[2] *= -1.;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)