| 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"; |
| 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; |
| 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 */ |
| 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 |
|
} |
| 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; |