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

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.101 by greg, Wed Jul 3 16:46:43 2024 UTC vs.
Revision 2.108 by greg, Fri Jun 20 03:43:17 2025 UTC

# Line 52 | Line 52 | extern RGBPRIMP  out_prims;            /* output color primitive
52  
53   int  dimlist[MAXDIM];                   /* sampling dimensions */
54   int  ndims = 0;                         /* number of sampling dimensions */
55 < int  samplendx;                         /* sample index number */
55 > unsigned long  samplendx;               /* sample index number */
56  
57   void  (*addobjnotify[])() = {ambnotify, NULL};
58  
# Line 119 | Line 119 | time_t  tstart;                                /* starting time */
119  
120   int  hres, vres;                        /* resolution for this frame */
121  
122 + extern void     sskip_ray(RAY *r, double h, double v);
123 +
124   static VIEW     lastview;               /* the previous view input */
125  
126   static void report(int);
# Line 132 | Line 134 | static int fillsample(COLOR *colline, float *zline, in
134                  int xlen, int ylen, int b);
135   static double pixvalue(COLOR  col, int  x, int  y);
136   static int salvage(char  *oldfile);
137 < static int pixnumber(int  x, int  y, int  xres, int  yres);
137 > static unsigned long pixnumber(int  x, int  y, int  xres, int  yres);
138  
139  
140  
# Line 287 | Line 289 | rpict(                 /* generate image(s) */
289          do {
290                  if (seq && nextview(stdin) == EOF)
291                          break;
292 +                lastview.type *= seq > 1;
293                  pctdone = 0.0;
294                  if (pout != NULL) {
295                          int     myfd;
# Line 474 | Line 477 | render(                                /* render the scene */
477                                                          /* fill bar */
478                  fillscanbar(scanbar, zbar, hres, ypos, ystep);
479                  if (srcdrawing)                         /* add bitty sources */
480 <                        drawsources((COLORV **)scanbar, zbar, 0, hres, ypos, ystep);
480 >                        drawsources((COLORV **)scanbar, out_prims, zbar, 0, hres, ypos, ystep);
481                                                          /* write it out */
482   #ifdef SIGCONT
483                  signal(SIGCONT, SIG_IGN);       /* don't interrupt writes */
# Line 668 | Line 671 | pixvalue(              /* compute pixel value */
671          int  y
672   )
673   {
671        static COLORMAT xyz2myrgbmat;
674          RAY  thisray;
675          FVECT   lorg, ldir;
676          double  hpos, vpos, lmax;
# Line 702 | Line 704 | pixvalue(              /* compute pixel value */
704          rayorigin(&thisray, PRIMARY, NULL, NULL);
705  
706          rayvalue(&thisray);                     /* trace ray */
707 +                                                /* -> color */
708 +        scolor_out(col, out_prims, thisray.rcol);
709  
706        if (out_prims == stdprims) {            /* return color */
707                scolor_rgb(col, thisray.rcol);
708        } else if (out_prims == xyzprims) {
709                scolor_cie(col, thisray.rcol);
710                scalecolor(col, WHTEFFICACY);
711        } else if (NCSAMP > 3) {
712                COLOR   xyz;
713                if (xyz2myrgbmat[0][0] == 0)
714                        compxyz2rgbWBmat(xyz2myrgbmat, out_prims);
715                scolor_cie(xyz, thisray.rcol);
716                colortrans(col, xyz2myrgbmat, xyz);
717                clipgamut(col, xyz[CIEY], CGAMUT_LOWER, cblack, cwhite);
718        } else
719                copycolor(col, thisray.rcol);
720
710          return(raydistance(&thisray));          /* return distance */
711   }
712  
# Line 782 | Line 771 | writerr:
771          return -1; /* pro forma return */
772   }
773  
774 < static int
774 > static unsigned long
775   pixnumber(              /* compute pixel index (screen door) */
776          int  x,
777          int  y,
# Line 799 | Line 788 | pixnumber(             /* compute pixel index (screen door) */
788                  ++nbits;
789          }
790          coord[0] = x; coord[1] = y;
791 <        return ((int)hilbert_c2i(2, nbits, coord));
791 >        return((unsigned long)hilbert_c2i(2, nbits, coord));
792   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines