ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rxcmain.cpp
(Generate patch)

Comparing ray/src/rt/rxcmain.cpp (file contents):
Revision 2.10 by greg, Fri Dec 13 21:12:40 2024 UTC vs.
Revision 2.11 by greg, Mon Dec 23 16:15:38 2024 UTC

# Line 415 | Line 415 | getRayBundle(FVECT *orig_dir = NULL)
415          int     n2go = myRCmanager.accum;
416  
417          switch (inpfmt) {
418 <        case 'a':                               // ASCII input
418 >        case 'a':                       // ASCII input
419                  if (!orig_dir)
420                          return skipWords(6*n2go);
421                  while (n2go-- > 0) {
# Line 428 | Line 428 | getRayBundle(FVECT *orig_dir = NULL)
428                          orig_dir += 2;
429                  }
430                  break;
431 <        case 'f':                               // float input
431 >        case 'f':                       // float input
432                  if (!orig_dir)
433                          return skipBytes(6*sizeof(float)*n2go);
434   #ifdef SMLFLT
435                  if (getbinary(orig_dir, sizeof(FVECT), 2*n2go, stdin) != 2*n2go)
436                          return false;
437 +                orig_dir += 2*n2go;
438   #else
439                  while (n2go-- > 0) {
440                          float   fvecs[6];
# Line 445 | Line 446 | getRayBundle(FVECT *orig_dir = NULL)
446                  }
447   #endif
448                  break;
449 <        case 'd':                               // double input
449 >        case 'd':                       // double input
450                  if (!orig_dir)
451                          return skipBytes(6*sizeof(double)*n2go);
452   #ifndef SMLFLT
453                  if (getbinary(orig_dir, sizeof(FVECT), 2*n2go, stdin) != 2*n2go)
454                          return false;
455 +                orig_dir += 2*n2go;
456   #else
457                  while (n2go-- > 0) {
458                          double  dvecs[6];
# Line 466 | Line 468 | getRayBundle(FVECT *orig_dir = NULL)
468                  error(INTERNAL, "unsupported format in getRayBundle()");
469                  return false;
470          }
471 <        int     warned = 0;             // normalize directions
470 <        n2go = myRCmanager.accum;
471 >        n2go = myRCmanager.accum;       // normalize directions
472          while (n2go-- > 0) {
473                  orig_dir -= 2;
474 <                if (normalize(orig_dir[1]) == 0)
474 <                        if (!warned++)
475 <                                error(WARNING, "zero ray direction on input");
474 >                normalize(orig_dir[1]);
475          }
476          return true;
477   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines