I use the following. It "feels" pretty reasonable.

                double scale = view.getScreenScale();
                scale *= 1+(-ychange * zoomMultiplier);
//constant proportion scale
                view.setScreenScale(scale);

where zoomMultiplier is nominally .01

I am using parallel projection here.

Jack

-----Original Message-----
From: Nitin.Jain [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 09, 2002 11:56 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Linear scaling for zoom


Hi,

I'm using the View.setScreenScale(scale) method for generating the
zooming
effect in my application. I'm not able to figure out a way to produce a
constant zooming effect. How to convert a linear mouse drag values into
the
"scale" parameter, which is a multiplication factor. The zooming-in and
zooming-out effect do not get performed at the same speed.

Thanks in advance,
Nitin

========================================================================
===
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".

==========================================================================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".

Reply via email to