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.17 by gregl, Thu Jan 1 13:00:15 1998 UTC vs.
Revision 3.19 by greg, Sat Feb 22 02:07:24 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1997 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Quadtree driver support routines.
6   */
# Line 89 | Line 86 | int    really;
86          }
87                                  /* else "really" means free up memory */
88          for (i = 0; twigbundle[i] != NULL; i++)
89 <                free((char *)twigbundle[i]);
90 <        free((char *)twigbundle);
89 >                free((void *)twigbundle[i]);
90 >        free((void *)twigbundle);
91          twigbundle = NULL;
92   }
93  
# Line 332 | Line 329 | dropit:
329   }
330  
331  
332 < dev_value(c, p, v)              /* add a pixel value to our quadtree */
332 > dev_value(c, d, p)              /* add a pixel value to our quadtree */
333   COLR    c;
334 < FVECT   p, v;
334 > FVECT   d, p;
335   {
336          register int    li;
337          int     mapit;
# Line 353 | Line 350 | FVECT  p, v;
350                          qtCompost(LFREEPCT);
351                  mapit = 0;                      /* we'll map it later */
352          }
353 <        VCOPY(qtL.wp[li], p);
354 <        qtL.wd[li] = encodedir(v);
353 >        if (p == NULL)
354 >                VSUM(qtL.wp[li], odev.v.vp, d, FHUGE);
355 >        else
356 >                VCOPY(qtL.wp[li], p);
357 >        qtL.wd[li] = encodedir(d);
358          tmCvColrs(&qtL.brt[li], qtL.chr[li], c, 1);
359          if (putleaf(li, 1)) {
360                  if (mapit)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines