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

Comparing ray/src/rt/rv3.c (file contents):
Revision 2.26 by greg, Fri Aug 29 05:46:03 2008 UTC vs.
Revision 2.28 by greg, Fri Sep 5 21:34:09 2008 UTC

# Line 377 | Line 377 | findrect(                              /* find a rectangle */
377  
378  
379   void
380 + compavg(                                /* recompute averages */
381 +        PNODE   *p
382 + )
383 + {
384 +        int     i, navg;
385 +        
386 +        if (p->kid == NULL)
387 +                return;
388 +
389 +        setcolor(p->v, .0, .0, .0);
390 +        navg = 0;
391 +        for (i = 0; i < 4; i++) {
392 +                if (p->kid[i].xmin >= p->kid[i].xmax) continue;
393 +                if (p->kid[i].ymin >= p->kid[i].ymax) continue;
394 +                compavg(p->kid+i);
395 +                addcolor(p->v, p->kid[i].v);
396 +                navg++;
397 +        }
398 +        if (navg > 1)
399 +                scalecolor(p->v, 1./navg);
400 + }
401 +
402 +
403 + void
404   scalepict(                              /* scale picture values */
405          PNODE  *p,
406          double  sf

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines