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

Comparing ray/src/hd/holo.c (file contents):
Revision 3.19 by schorsch, Mon Jul 21 22:30:18 2003 UTC vs.
Revision 3.20 by schorsch, Sun Jul 27 22:12:02 2003 UTC

# Line 35 | Line 35 | register HOLO  *hp;
35          for (i = 0; i < 3; i++) {
36                  fcross(hp->wg[i], hp->xv[(i+1)%3], hp->xv[(i+2)%3]);
37                  d = DOT(hp->wg[i],hp->xv[i]);
38 <                if (d <= FTINY & d >= -FTINY)
38 >                if ((d <= FTINY) & (d >= -FTINY))
39                          error(USER, "degenerate holodeck section");
40                  d = hp->grid[i] / d;
41                  hp->wg[i][0] *= d; hp->wg[i][1] *= d; hp->wg[i][2] *= d;
# Line 63 | Line 63 | register int   i;
63          int     n2, reverse;
64          GCOORD  g2[2];
65                                          /* check range */
66 <        if (i < 1 | i > nbeams(hp))
66 >        if ((i < 1) | (i > nbeams(hp)))
67                  return(0);
68 <        if (reverse = i >= hp->wi[5])
68 >        if ( (reverse = i >= hp->wi[5]) )
69                  i -= hp->wi[5] - 1;
70          for (j = 0; j < 5; j++)         /* find w0 */
71                  if (hp->wi[j+1] > i)
# Line 107 | Line 107 | register GCOORD        gc[2];
107          int     reverse;
108          register int    i, j;
109                                          /* check ordering and limits */
110 <        if (reverse = gc[0].w > gc[1].w) {
110 >        if ( (reverse = gc[0].w > gc[1].w) ) {
111                  *g2 = *(gc+1);
112                  *(g2+1) = *gc;
113                  gc = g2;
114          } else if (gc[0].w == gc[1].w)
115                  return(0);
116 <        if (gc[0].w < 0 | gc[1].w > 5)
116 >        if ((gc[0].w < 0) | (gc[1].w > 5))
117                  return(0);
118          i = 0;                          /* compute index */
119          for (j = gc[0].w+1; j < gc[1].w; j++)
# Line 296 | Line 296 | FVECT  ro, rd;         /* normalization of rd affects distance
296                          }
297                  }
298          }
299 <        if (gc[0].w < 0 | gc[1].w < 0)          /* paranoid check */
299 >        if ((gc[0].w < 0) | (gc[1].w < 0))              /* paranoid check */
300                  return(FHUGE);
301                                                  /* compute intersections */
302          VSUM(p[0], ro, rd, t0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines