Yes there are two methods I know of that will let you perceive the
zoom in a scene with parallel projection:

One way is to resize your BranchGroup using a TransformGroup.

The other way is to change your screen size, something like this:

 public void changeZoom(double scale)
 {
   Canvas3D c = view.getCanvas3D(0);
   Screen3D s = c.getScreen3D();
   double w = s.getPhysicalScreenWidth();

   double viewScale = scale * (w / zeroZoomDivider);

   view.setScreenScale(viewScale);
 }

(zeroZoomDivider is the original eye distance to the scene)

Hope this helps ...


Best Regards,

Roger Berggren


Jasmine Kwok wrote:

Thanks. I get your point. So is there no way we can zoom an object using
other methods if we use the parallel projection.


Regards,
Jasmine Kwok
 ----- Original Message -----
 From: Patrick-Emmanuel Boulanger-Nadeau
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 13, 2003 11:22 AM
 Subject: Re: [JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?


 Try putting two object on the side of each other then zoom one in and
out. You'll notice that they actually change position in the Z axis. You
just can't perseive (how is it spelled ?) it since the projection is
parallel, meaning however far it is it will look the same. It's also
refered as an orthogonal projection..

 Patrick-Emmanuel
   ----- Original Message -----
   From: Jasmine Kwok
   To: [EMAIL PROTECTED]
   Sent: Wednesday, February 12, 2003 8:12 PM
   Subject: Re: [JAVA3D] Mouse Zoom does not work with
PARALLEL_PROJECTION?


   Hi all!

   I'm sorry. There's a slight mistake in my email previously. what I
meant simply was that
   Mouse Zoom couldn't work Parallel projection but was fine with
perspective projection.
   In fact, translate and rotate were fine with both perspective and
parallel projection. Zoom is the main cause of problem here.

   Jasmine Kwok
     ----- Original Message -----
     From: Jasmine Kwok
     To: [EMAIL PROTECTED]
     Sent: Thursday, February 13, 2003 11:06 AM
     Subject: [JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?


     Dear all,

     does anybody knows if View.PARALLEL_PROJECTION works with MouseZoom?

     I have a program which uses MouseZoom, MouseTranslate and
MouseRotate. They work fine with both parallel and perspective projection.
However, when I change the projection policy to PARALLEL_PROJECTION, only
the zoom does not work.  Or do I have to set any other attributes?

     Would greatly appreciate your help.
     Thank you.

     Jasmine Kwok
- att-1.htm

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