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

Comparing ray/src/common/convertobj.c (file contents):
Revision 2.5 by greg, Fri Apr 16 15:18:33 2021 UTC vs.
Revision 2.6 by greg, Sat Apr 17 14:51:33 2021 UTC

# Line 48 | Line 48 | checksmooth(Scene *sc, Face *f, void *ptr)
48          if ((i < 0) & !nrev)                    /* all normals agree w/ face? */
49                  return(0);
50          if (nrev == f->nv) {                    /* all reversed? */
51 <                for (i = f->nv; i--; )          /* remove normal indices */
52 <                        f->v[i].nid = -1;
53 <                for (i = f->nv/2; i--; ) {      /* and swap others around */
51 >                for (i = f->nv/2; i--; ) {      /* swap vertices around */
52                          int     j = f->nv-1 - i;
53 <                        int     vi = f->v[i].vid;
54 <                        int     ti = f->v[i].tid;
55 <                        f->v[i].vid = f->v[j].vid;
58 <                        f->v[i].tid = f->v[j].tid;
59 <                        f->v[j].vid = vi;
60 <                        f->v[j].tid = ti;
53 >                        VertEnt tve = f->v[i];
54 >                        f->v[i] = f->v[j];
55 >                        f->v[j] = tve;
56                  }
57                  return(0);
58          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines