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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.46 by greg, Fri Jun 10 20:44:00 2005 UTC vs.
Revision 2.48 by greg, Tue Jun 21 15:06:50 2005 UTC

# Line 46 | Line 46 | char  *outvals = "v";                  /* output specification */
46  
47   int  do_irrad = 0;                      /* compute irradiance? */
48  
49 + int  rand_samp = 0;                     /* pure Monte Carlo sampling? */
50 +
51   void  (*trace)() = NULL;                /* trace call */
52  
53   char  *tralist[128];                    /* list of modifers to trace (or no) */
# Line 195 | Line 197 | rtrace(                                /* trace rays from file */
197                                  nextflush = hresolu;
198                          }
199                  } else {
200 <                        samplendx++;
200 >                        samplendx = rand_samp ? random() : samplendx+1;
201                                                          /* compute and print */
202                          if (imm_irrad)
203                                  irrad(orig, direc);
# Line 636 | Line 638 | oputW(                         /* print contribution */
638          RAY  *r
639   )
640   {
641 <        COLOR   contr;
641 >        double  contr[3];
642  
643          raycontrib(contr, r, PRIMARY);
644 <        (*putreal)(colval(contr,RED));
645 <        (*putreal)(colval(contr,GRN));
646 <        (*putreal)(colval(contr,BLU));
644 >        (*putreal)(contr[RED]);
645 >        (*putreal)(contr[GRN]);
646 >        (*putreal)(contr[BLU]);
647   }
648  
649  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines