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

Comparing ray/src/hd/rhd_qtree.c (file contents):
Revision 3.26 by greg, Fri Jan 7 20:33:02 2005 UTC vs.
Revision 3.28 by greg, Wed Jan 24 04:39:52 2018 UTC

# Line 103 | Line 103 | qtFreeTree(            /* free allocated twigs */
103  
104  
105   #define LEAFSIZ         (3*sizeof(float)+sizeof(int32)+\
106 <                        sizeof(TMbright)+6*sizeof(BYTE))
106 >                        sizeof(TMbright)+6*sizeof(uby8))
107  
108   extern int
109   qtAllocLeaves(          /* allocate space for n leaves */
# Line 132 | Line 132 | qtAllocLeaves(         /* allocate space for n leaves */
132          qtL.wp = (float (*)[3])qtL.base;
133          qtL.wd = (int32 *)(qtL.wp + n);
134          qtL.brt = (TMbright *)(qtL.wd + n);
135 <        qtL.chr = (BYTE (*)[3])(qtL.brt + n);
136 <        qtL.rgb = (BYTE (*)[3])(qtL.chr + n);
135 >        qtL.chr = (uby8 (*)[3])(qtL.brt + n);
136 >        qtL.rgb = (uby8 (*)[3])(qtL.chr + n);
137          qtL.nl = n;
138          qtL.tml = qtL.bl = qtL.tl = 0;
139          falleaves = -1;
# Line 268 | Line 268 | putleaf(               /* put a leaf in our tree */
268                  return(0);
269                                          /* compute leaf location in view */
270          VCOPY(wp, qtL.wp[li]);
271 <        viewloc(ip, &odev.v, wp);
272 <        if (ip[2] <= 0. || ip[0] < 0. || ip[0] >= 1.
273 <                        || ip[1] < 0. || ip[1] >= 1.)
271 >        if (viewloc(ip, &odev.v, wp) != 1)
272                  goto dropit;                    /* behind or outside view */
273   #ifdef DEBUG
274          if (odev.v.type == VT_PAR | odev.v.vfore > FTINY)
# Line 379 | Line 377 | dev_value(             /* add a pixel value to our quadtree */
377          tmCvColrs(tmGlobal, &qtL.brt[li], qtL.chr[li], (COLR *)c, 1);
378          if (putleaf(li, 1)) {
379                  if (mapit)
380 <                        tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+li), qtL.brt+li,
381 <                                        (BYTE *)(qtL.chr+li), 1);
380 >                        tmMapPixels(tmGlobal, (uby8 *)(qtL.rgb+li), qtL.brt+li,
381 >                                        (uby8 *)(qtL.chr+li), 1);
382                  if (--rayqleft == 0)
383                          dev_flush();            /* flush output */
384          }
# Line 434 | Line 432 | qtMapLeaves(           /* map our leaves to RGB */
432                  if (tmComputeMapping(tmGlobal, 0., 0., 0.) != TM_E_OK)
433                          return(0);
434          }
435 <        if (tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+aorg), qtL.brt+aorg,
436 <                        (BYTE *)(qtL.chr+aorg), alen) != TM_E_OK)
435 >        if (tmMapPixels(tmGlobal, (uby8 *)(qtL.rgb+aorg), qtL.brt+aorg,
436 >                        (uby8 *)(qtL.chr+aorg), alen) != TM_E_OK)
437                  return(0);
438          if (blen > 0)
439 <                tmMapPixels(tmGlobal, (BYTE *)(qtL.rgb+borg), qtL.brt+borg,
440 <                                (BYTE *)(qtL.chr+borg), blen);
439 >                tmMapPixels(tmGlobal, (uby8 *)(qtL.rgb+borg), qtL.brt+borg,
440 >                                (uby8 *)(qtL.chr+borg), blen);
441          qtL.tml = qtL.tl;
442          return(1);
443   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines