> Date: Wed, 16 May 2001 20:31:27 -0400
> From: Roy Duffy <[EMAIL PROTECTED]>
>
> I need to preserve the image (but just see more or less of it) when my
> application window resizes. Calling
> "view.setWindowResizePolicy(View.VIRTUAL_WORLD);" would be exactly what I
> need, but it is a documented bug that this doesn't work yet.
This got me as well when I was studying and playing with the view model.
I searched for the bug and it is classified as a documentation bug.
The problem is that there are undocumented dependencies between the
resize, movement, and eyepoint policies. I'm not sure if the
dependencies themselves are bugs or if it really is a matter of
documentation.
I found that to get the effect you want, you need to call both
View.setWindowResizePolicy() and View.setWindowMovementPolicy() with
View.VIRTUAL_WORLD, and call View.setWindowEyepointPolicy() with
View.RELATIVE_TO_SCREEN.
If you're using SimpleUniverse, get the View object from SimpleUniverse
by getting the Viewer object with SimpleUniverse's getViewer() method,
and then calling Viewer's getView() method.
(Sorry for writing about the code instead of just typing it, but even a
one-line code fragment requires me to preface it with Sun's huge legal
disclaimer).
> I thought I had a solution with the frustum and/or perspective functions in
> Transform3D, but the documentation says those are "Compatability functions"
> which are "primarily intended to help jump-start porting of existing
> applications" and "limit the portability of Java 3D programs." It sounds
> like we are being discouraged from using these methods, so I am back to my
> original question:
Compatibility mode primarily limits the portability of Java 3D programs to
alternative view environments such as virtual reality setups with head
trackers, stereo shutter glasses, head-mounted displays, multiple screens, or
portal/cave environments. If don't care about that, then compatibility mode
may be a viable option for you.
Hope that helps -- 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".