| 33 |
|
static char ill_horiz[] = "illegal horizontal view size"; |
| 34 |
|
static char ill_vert[] = "illegal vertical view size"; |
| 35 |
|
|
| 36 |
< |
if (v->vaft < -FTINY || (v->vaft > FTINY && v->vaft <= v->vfore)) |
| 36 |
> |
if ((v->vfore < -FTINY) | (v->vaft < -FTINY) || |
| 37 |
> |
(v->vaft > FTINY) & (v->vaft <= v->vfore)) |
| 38 |
|
return("illegal fore/aft clipping plane"); |
| 39 |
|
|
| 40 |
|
if (v->vdist <= FTINY) |
| 222 |
|
y *= sqrt(v->vn2); |
| 223 |
|
d = x*x + y*y; |
| 224 |
|
z = (1. - d)/(1. + d); |
| 225 |
< |
d = d <= FTINY*FTINY ? PI : sqrt((1.0 - z*z)/d); |
| 226 |
< |
x *= d; |
| 226 |
< |
y *= d; |
| 225 |
> |
x *= (1. + z); |
| 226 |
> |
y *= (1. + z); |
| 227 |
|
direc[0] = z*v->vdir[0] + x*v->hvec[0] + y*v->vvec[0]; |
| 228 |
|
direc[1] = z*v->vdir[1] + x*v->hvec[1] + y*v->vvec[1]; |
| 229 |
|
direc[2] = z*v->vdir[2] + x*v->hvec[2] + y*v->vvec[2]; |
| 308 |
|
return; |
| 309 |
|
if (d <= -(1.0-FTINY)) |
| 310 |
|
return; /* really an error */ |
| 311 |
< |
d = sqrt(1.0 - d*d) / (1.0 + d); |
| 312 |
< |
ip[0] += DOT(disp,v->hvec)*d/sqrt(v->hn2); |
| 313 |
< |
ip[1] += DOT(disp,v->vvec)*d/sqrt(v->vn2); |
| 311 |
> |
ip[0] += DOT(disp,v->hvec)/((1. + d)*sqrt(v->hn2)); |
| 312 |
> |
ip[1] += DOT(disp,v->vvec)/((1. + d)*sqrt(v->vn2)); |
| 313 |
|
return; |
| 314 |
|
} |
| 315 |
|
ip[0] = DOT(disp,v->hvec)/v->hn2 + 0.5 - v->hoff; |