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

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.3 by greg, Mon Jun 11 05:07:55 2012 UTC vs.
Revision 2.4 by greg, Tue Jun 12 17:20:44 2012 UTC

# Line 63 | Line 63 | int    account;                        /* current accumulation count */
63   RNUMBER raysleft;                       /* number of rays left to trace */
64   long    waitflush;                      /* how long until next flush */
65  
66 < int     lastray = 0;                    /* last ray number sent */
67 < int     lastdone = 0;                   /* last ray output */
66 > RNUMBER lastray = 0;                    /* last ray number sent */
67 > RNUMBER lastdone = 0;                   /* last ray output */
68  
69   static void mcfree(void *p) { epfree((*(MODCONT *)p).binv); free(p); }
70  
# Line 350 | Line 350 | rcontrib()
350   #endif
351          while (getvec(orig) == 0 && getvec(direc) == 0) {
352                  d = normalize(direc);
353 <                if ((d == 0.0) & (accumulate != 1)) {
353 >                if (nchild != -1 && (d == 0.0) & (accumulate != 1)) {
354                          if (!ignore_warning_given++)
355                                  error(WARNING,
356                                  "dummy ray(s) ignored during accumulation\n");
# Line 362 | Line 362 | rcontrib()
362                  if (d == 0.0) {                         /* zero ==> flush */
363                          if ((yres <= 0) | (xres <= 0))
364                                  waitflush = 1;          /* flush right after */
365 +                        account = 1;
366                  } else {                                /* else compute */
367                          eval_ray(orig, direc, lim_dist ? d : 0.0);
368                  }
# Line 370 | Line 371 | rcontrib()
371                  if (raysleft && !--raysleft)
372                          break;          /* preemptive EOI */
373          }
374 <        if (accumulate <= 0 || account < accumulate) {
374 >        if (nchild != -1 && (accumulate <= 0) | (account < accumulate)) {
375                  if (account < accumulate) {
376                          error(WARNING, "partial accumulation in final record");
377                          accumulate -= account;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines