| 30 |
|
static char ill_horiz[] = "illegal horizontal view size"; |
| 31 |
|
static char ill_vert[] = "illegal vertical view size"; |
| 32 |
|
|
| 33 |
< |
if (v->vfore < -FTINY || v->vaft < -FTINY || |
| 34 |
< |
(v->vaft > FTINY && v->vaft <= v->vfore)) |
| 33 |
> |
if (v->vaft < -FTINY || (v->vaft > FTINY && v->vaft <= v->vfore)) |
| 34 |
|
return("illegal fore/aft clipping plane"); |
| 35 |
|
|
| 36 |
|
if (normalize(v->vdir) == 0.0) /* normalize direction */ |
| 245 |
|
d = 1.0/sqrt(d*d + d2*d2); |
| 246 |
|
ip[1] = DOT(disp,v->vvec)*d/v->vn2 + 0.5 - v->voff; |
| 247 |
|
ip[2] = VLEN(disp); |
| 248 |
< |
if (v->vfore > FTINY) |
| 250 |
< |
ip[2] *= (1.0 - v->vfore*d); |
| 248 |
> |
ip[2] *= (1.0 - v->vfore*d); |
| 249 |
|
return; |
| 250 |
|
case VT_ANG: /* angular fisheye */ |
| 251 |
|
ip[0] = 0.5 - v->hoff; |
| 516 |
|
}; |
| 517 |
|
|
| 518 |
|
|
| 519 |
< |
static |
| 519 |
> |
static int |
| 520 |
|
gethview(s, v) /* get view from header */ |
| 521 |
|
char *s; |
| 522 |
|
register struct myview *v; |
| 523 |
|
{ |
| 524 |
|
if (isview(s) && sscanview(v->hv, s) > 0) |
| 525 |
|
v->ok++; |
| 526 |
+ |
return(0); |
| 527 |
|
} |
| 528 |
|
|
| 529 |
|
|