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

Comparing ray/src/common/face.c (file contents):
Revision 1.3 by greg, Fri Jul 28 14:27:44 1989 UTC vs.
Revision 2.2 by greg, Fri Oct 2 16:02:20 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 34 | Line 34 | FACE *
34   getface(o)                      /* get arguments for a face */
35   OBJREC  *o;
36   {
37        double  fabs();
37          double  d1;
38          int  badvert;
39          FVECT  v1, v2, v3;
# Line 84 | Line 83 | OBJREC  *o;
83                  badvert += fabs(d1 - f->offset/i) > VERTEPS;
84                  f->offset += d1;
85          }
86 <        f->offset /= f->nv;
86 >        f->offset /= (double)f->nv;
87          if (badvert)
88                  objerror(o, WARNING, "non-planar vertex");
89                                                  /* find axis */
# Line 99 | Line 98 | OBJREC  *o;
98   freeface(o)                     /* free memory associated with face */
99   OBJREC  *o;
100   {
101 +        if (o->os == NULL)
102 +                return;
103          free(o->os);
104          o->os = NULL;
105   }
# Line 111 | Line 112 | FACE  *f;
112          int  ncross, n;
113          double  x, y;
114          register int  xi, yi;
115 <        register double  *p0, *p1;
115 >        register FLOAT  *p0, *p1;
116  
117          xi = (f->ax+1)%3;
118          yi = (f->ax+2)%3;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines