In case anyone else is interested, below is code that successfully
modifies the "magnification" of some View, using Doug Gehringer's advice to
effect magnification by modifying the field of view.
I tried to magnify by using scaling on the ViewingPlatform's transform,
but I couldn't get that to work. The behavior was flaky, and the view
frustrum culling's intersection with the actual universe changed -- it began
slicing off the scene.
I'd been hoping to effect magnification by scaling the view transform so
that it could easily be set back to mag = 1. This could also be done with
the field-of-view method, but only if the original field-of-view is known.
(Best read in monowidth font)
###########################################################################
# WORKING CODE
###########################################################################
// Let f = magnification factor
// Let newFov = new field of view = 2 * phi
// Let oldFov = old field of view = 2 * theta
//
// <--b-->
// +--+--+ tan(theta) = h/b
// \ \ | h tan(phi) = h/fb
// \>| | <--phi h = b tan(theta)
// \\ | tan(phi) = b tan(theta) /
fb
// theta--> \\| <-- phi =
rctan( tan(theta)/f )
// + newFov = 2 *
rctan( tan( oldFov / 2 ) / f )
//
double oldFov = view.getFieldOfView();
double newFov = 2 * Math.atan( Math.tan( oldFov / 2 ) / factor );
view.setFieldOfView( newFov );
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".