Mark Hood schrieb:

> > Date:         Mon, 21 Jan 2002 09:32:41 +0100
> > From: "Dipl. Ing. Paul Szawlowski" <[EMAIL PROTECTED]>
> > "W. Gampp" schrieb:
> >
> > > I cannot figure out how to implement a zoom in Java3D. I want to use it in
> > > my own version of keyboard navigation. My Behavior class works fine for
> > > moves in all space directions, but I didn't find any solution for zooming
> > > in/out.
> > >
> > > Since I don't want a rescale or movement when resizing or moving the window
> > > on the screen I use the WindowEyepointPolicy
> > > RELATIVE_TO_WINDOW. Unfortunately with this policy changes of the
> > > "fieldOfView" (which should normally do the zoom) have no effect.
> > >
> > > Has anyone found a solution or is there a better documentation of the
> > > transformation details than Sun has in its API documentation or tutorial?
>
> With the RELATIVE_TO_WINDOW policy the eyepoint stays fixed relative to
> the window.  In Java 3D the projection frustum is not exposed as part of the
> view model, unless you are using the compatibility mode feature.  When the
> WindowEyePoint policy is RELATIVE_TO_FIELD_OF_VIEW, changes to the field of
> view result in moving the eyepoint back and forth in Z relative to the window.
> This is not allowed with the RELATIVE_TO_WINDOW policy.
>
> In Java 3D the whole view model is based on eye positions relative to display
> surfaces.  This is what allows the view model to encompass VR caves and head
> mounted displays to single-screen desktops to high-resolution off-screen images
> for printing.  But it is also what causes the most confusion I think.
>
> > In this case I think you have to use the setLeftManualEyeInImagePlate and
> > setRightManualEyeInImagePlate methods of Canvas3D. Read the Accessing and
> > Modifying an Eye's Image Plate Position description in the API documentation
> > of Canvas3D
>
> These methods are exactly what you call in order to change the position of the
> eye when using the RELATIVE_TO_WINDOW policy.  I get the impression, though,
> that the original poster doesn't want to change the location of the eyepoint in
> order to effect a zoom.  If that's the case then setting the screen scale is
> the appropriate solution.  Call the setScreenScalePolicy() method of the view
> with the View.SCALE_EXPLICIT policy, and then call setScreenScale() with the
> desired scale.

>From an email of  K. Rushforth ( in the archives):
View.setScale is supported in perspective mode. However, in the default case where
(0,0,0) in view platform coordinates is centered about the eye (view attach policy
of NOMINAL_HEAD), a scale will have no visible effect on the size of the object,
due to perspective. The objects are getting smaller or larger, but they also are
getting closer or farther away. This can cause objects to be clipped that otherwise
wouldn't, but those objects that are not clipped are drawn the same apparent size.



>
>
> The default policy is View.SCALE_SCREEN_SIZE, which sets the scale factor so
> that the range [-1.0 .. +1.0] in virtual world coordinates maps to the width of
> the display window (when using the PHYSICAL_WORLD window resize policy) or the
> width of then entire screen (when using the VIRTUAL_WORLD window resize
> policy).
>
> -- Mark Hood
>
> ===========================================================================
> 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