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

Comparing ray/src/px/pinterp.c (file contents):
Revision 2.24 by greg, Thu Sep 14 13:40:17 1995 UTC vs.
Revision 2.25 by greg, Fri Sep 15 22:04:04 1995 UTC

# Line 61 | Line 61 | COLR   *ourpict;                       /* output picture (COLR's) */
61   COLOR   *ourspict;                      /* output pixel sums (averaging) */
62   float   *ourweigh = NULL;               /* output pixel weights (averaging) */
63   float   *ourzbuf;                       /* corresponding z-buffer */
64 < COLOR   *ourbpict = NULL;               /* blurred picture */
64 > COLOR   *ourbpict = NULL;               /* blurred picture (view averaging) */
65  
66   VIEW    avgview;                        /* average view for -B option */
67   int     nvavg;                          /* number of views averaged */
# Line 516 | Line 516 | register VIEW  *vw1, *vw2;
516   {
517          double  m4t[4][4];
518  
519 <        if (vw1->type != VT_PER && vw1->type != VT_PAR)
519 >        if (vw1->type != VT_PER & vw1->type != VT_PAR)
520                  return(0);
521 <        if (vw2->type != VT_PER && vw2->type != VT_PAR)
521 >        if (vw2->type != VT_PER & vw2->type != VT_PAR)
522                  return(0);
523          setident4(xfmat);
524          xfmat[0][0] = vw1->hvec[0];
# Line 635 | Line 635 | double z;
635                  y1 = p0->y + c1*s1y/l1;
636                  for (c2 = l2; c2-- > 0; ) {
637                          x = x1 + c2*s2x/l2;
638 <                        if (x < 0 || x >= hresolu)
638 >                        if (x < 0 | x >= hresolu)
639                                  continue;
640                          y = y1 + c2*s2y/l2;
641 <                        if (y < 0 || y >= vresolu)
641 >                        if (y < 0 | y >= vresolu)
642                                  continue;
643                          if (averaging) {
644                                  if (zscan(y)[x] <= 0 || zscan(y)[x]-z
# Line 673 | Line 673 | register FVECT pos;
673          if (usematrix) {
674                  pos[0] += theirview.hoff - .5;
675                  pos[1] += theirview.voff - .5;
676 <                if (normdist && theirview.type == VT_PER)
676 >                if (normdist & theirview.type == VT_PER)
677                          d = sqrt(1. + pos[0]*pos[0]*theirview.hn2
678                                          + pos[1]*pos[1]*theirview.vn2);
679                  else
# Line 707 | Line 707 | register FVECT pos;
707                  if (pos[2] <= 0)
708                          return(0);
709          }
710 <        if (pos[0] < 0 || pos[0] >= 1-FTINY || pos[1] < 0 || pos[1] >= 1-FTINY)
710 >        if (pos[0] < 0 | pos[0] >= 1-FTINY | pos[1] < 0 | pos[1] >= 1-FTINY)
711                  return(0);
712          if (!averaging)
713                  return(1);
# Line 1178 | Line 1178 | clearqueue()                           /* process queue */
1178                  if (averaging) {
1179                          setcolor(sscan(queue[i][1])[queue[i][0]],
1180                                          fbp[0], fbp[1], fbp[2]);
1181 <                        wscan(queue[i][1])[queue[i][0]] = 1;
1181 >                        wscan(queue[i][1])[queue[i][0]] = MAXWT;
1182                  } else
1183                          setcolr(pscan(queue[i][1])[queue[i][0]],
1184                                          fbp[0], fbp[1], fbp[2]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines