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

Comparing ray/src/common/triangulate.c (file contents):
Revision 2.2 by greg, Fri Jan 24 01:26:44 2014 UTC vs.
Revision 2.3 by greg, Fri Jan 24 02:22:49 2014 UTC

# Line 53 | Line 53 | polySnip(const Vert2_list *contour, int u, int v, int
53  
54    for (p=0;p<n;p++)
55    {
56 <    if( (p == u) || (p == v) || (p == w) ) continue;
56 >    if( (p == u) | (p == v) | (p == w) ) continue;
57      Px = contour->v[V[p]].mX;
58      Py = contour->v[V[p]].mY;
59      if (insideTriangle(Ax,Ay,Bx,By,Cx,Cy,Px,Py)) return false;
# Line 146 | Line 146 | polyTriangulate(const Vert2_list *contour, tri_out_t *
146    for(m=0, v=nv-1; nv>2; )
147    {
148      /* if we loop, it is probably a non-simple polygon */
149 <    if (0 >= (count--))
149 >    if (0 >= count--)
150      {
151 <      /* Triangulate: ERROR - probable bad polygon! */
151 >      /* Triangulate: ERROR - probable bad polygon */
152        return false;
153      }
154  
# Line 172 | Line 172 | polyTriangulate(const Vert2_list *contour, tri_out_t *
172        /* remove v from remaining polygon */
173        for(s=v,t=v+1;t<nv;s++,t++) V[s] = V[t]; nv--;
174  
175 <      /* resest error detection counter */
175 >      /* reset error detection counter */
176        count = 2*nv;
177      }
178    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines