| 231 |
|
FVECT ip, |
| 232 |
|
VIEW *v, |
| 233 |
|
FVECT p |
| 234 |
< |
) |
| 234 |
> |
) /* returns: Good=1, Bad=0, Behind=-1, OutOfFrame=2, Behind+OOF=-2 */ |
| 235 |
|
{ |
| 236 |
|
double d, d2; |
| 237 |
|
FVECT disp; |
| 304 |
|
ip[0] += DOT(disp,v->hvec)/((1. + d)*sqrt(v->hn2)); |
| 305 |
|
ip[1] += DOT(disp,v->vvec)/((1. + d)*sqrt(v->vn2)); |
| 306 |
|
goto gotall; |
| 307 |
+ |
default: |
| 308 |
+ |
return(0); |
| 309 |
|
} |
| 310 |
|
ip[0] = DOT(disp,v->hvec)/v->hn2 + 0.5 - v->hoff; |
| 311 |
|
ip[1] = DOT(disp,v->vvec)/v->vn2 + 0.5 - v->voff; |
| 312 |
< |
gotall: /* return -1 if behind */ |
| 313 |
< |
return(1 - 2*(ip[2] <= 0.0)); |
| 312 |
> |
gotall: /* compute return value */ |
| 313 |
> |
return( (1 - 2*(ip[2] <= 0.0)) * (1 + |
| 314 |
> |
((0.0 >= ip[0]) | (ip[0] >= 1.0) | (0.0 >= ip[1]) | (ip[1] >= 1.0))) ); |
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
|