171 |
|
|
172 |
|
if (getinterest(s, 1, nv.vdir, &zfact) < 0) |
173 |
|
return; |
174 |
+ |
nv.type = ourview.type; |
175 |
|
VCOPY(nv.vp, ourview.vp); |
176 |
|
VCOPY(nv.vup, ourview.vup); |
177 |
|
nv.hoff = ourview.hoff; nv.voff = ourview.voff; |
178 |
< |
if ((nv.type = ourview.type) == VT_PAR) { |
179 |
< |
nv.horiz = ourview.horiz / zfact; |
179 |
< |
nv.vert = ourview.vert / zfact; |
180 |
< |
} else { |
181 |
< |
nv.horiz = atan(tan(ourview.horiz*(PI/180./2.))/zfact) / |
182 |
< |
(PI/180./2.); |
183 |
< |
nv.vert = atan(tan(ourview.vert*(PI/180./2.))/zfact) / |
184 |
< |
(PI/180./2.); |
185 |
< |
} |
178 |
> |
nv.horiz = ourview.horiz; nv.vert = ourview.vert; |
179 |
> |
zoomview(&nv, zfact); |
180 |
|
newview(&nv); |
181 |
|
} |
182 |
|
|
206 |
|
error(COMMAND, "missing angle"); |
207 |
|
return; |
208 |
|
} |
209 |
+ |
nv.type = ourview.type; |
210 |
|
VCOPY(nv.vp, ourview.vp); |
211 |
|
VCOPY(nv.vup, ourview.vup); |
212 |
|
nv.hoff = ourview.hoff; nv.voff = ourview.voff; |
216 |
|
normalize(v1); |
217 |
|
spinvector(nv.vdir, nv.vdir, v1, elev*(PI/180.)); |
218 |
|
} |
219 |
< |
if ((nv.type = ourview.type) == VT_PAR) { |
220 |
< |
nv.horiz = ourview.horiz / zfact; |
226 |
< |
nv.vert = ourview.vert / zfact; |
227 |
< |
} else { |
228 |
< |
nv.horiz = atan(tan(ourview.horiz*(PI/180./2.))/zfact) / |
229 |
< |
(PI/180./2.); |
230 |
< |
nv.vert = atan(tan(ourview.vert*(PI/180./2.))/zfact) / |
231 |
< |
(PI/180./2.); |
232 |
< |
} |
219 |
> |
nv.horiz = ourview.horiz; nv.vert = ourview.vert; |
220 |
> |
zoomview(&nv, zfact); |
221 |
|
newview(&nv); |
222 |
|
} |
223 |
|
|
529 |
|
if ((*dev->getcur)(&x, &y) == ABORT) |
530 |
|
return; |
531 |
|
|
532 |
< |
viewray(thisray.rorg, thisray.rdir, &ourview, |
533 |
< |
(x+.5)/hresolu, (y+.5)/vresolu); |
534 |
< |
|
532 |
> |
if (viewray(thisray.rorg, thisray.rdir, &ourview, |
533 |
> |
(x+.5)/hresolu, (y+.5)/vresolu) < 0) { |
534 |
> |
error(COMMAND, "not on image"); |
535 |
> |
return; |
536 |
> |
} |
537 |
> |
|
538 |
|
} else if (normalize(thisray.rdir) == 0.0) { |
539 |
|
error(COMMAND, "zero ray direction"); |
540 |
|
return; |