| 260 |
|
} |
| 261 |
|
|
| 262 |
|
|
| 263 |
< |
moveview(angle, mag, vc) /* move viewpoint */ |
| 264 |
< |
double angle, mag; |
| 263 |
> |
moveview(angle, elev, mag, vc) /* move viewpoint */ |
| 264 |
> |
double angle, elev, mag; |
| 265 |
|
FVECT vc; |
| 266 |
|
{ |
| 267 |
|
extern double sqrt(), dist2(); |
| 268 |
|
double d; |
| 269 |
+ |
FVECT v1; |
| 270 |
|
VIEW nv; |
| 271 |
|
register int i; |
| 272 |
|
|
| 273 |
|
VCOPY(nv.vup, ourview.vup); |
| 274 |
|
nv.hresolu = ourview.hresolu; nv.vresolu = ourview.vresolu; |
| 275 |
|
spinvector(nv.vdir, ourview.vdir, ourview.vup, angle*(PI/180.)); |
| 276 |
+ |
if (elev != 0.0) { |
| 277 |
+ |
fcross(v1, ourview.vup, nv.vdir); |
| 278 |
+ |
normalize(v1); |
| 279 |
+ |
spinvector(nv.vdir, nv.vdir, v1, elev*(PI/180.)); |
| 280 |
+ |
} |
| 281 |
|
if ((nv.type = ourview.type) == VT_PAR) { |
| 282 |
|
nv.horiz = ourview.horiz / mag; |
| 283 |
|
nv.vert = ourview.vert / mag; |