> From: Vladimir Olenin <[EMAIL PROTECTED]>
>
> Mmmm. Tim, it wasn't actually what i meant. What i did mean was a kind
> of setting proportion between physical window in pixels and virtual world in
> meters. That is can i somehow set 'zooming' factor of virtual world (how many
> meters of virtual world would fit in the pixels dimensions of window)?
I think there are two issues here: what is the relation between physical and
VWorld coordinates, and is this relation useful in setting the scaling factor
for objects in the virtual world.
The transform between physical and VWorld coorindates is called the coexistence
transform. It maps between your virtual world and it's physical representation
in the real world. Java3D has a lot of flexibility when it comes to this
transform, so that Java3D can support different kinds of output devices, for
example: monitors, VR caves, "projection" glasses, etc. Additional "hooks" in
the viewing model can be used to support extra input devices like head mounted
trackers so that the view on the sceen can change as the viewer's position
relative to the screen changes. The details of how this works are beyond what I
can cover in this email, but the idea is that the coexistence transform maps the
observer and display between the physical and virtual worlds. The user and
display exist in both worlds (they "coexist", thus the name) and the mapping
between them depends on the view model in use.
In the case of displaying a window on the screen, the default viewing model
maps the VWorld range x,y = [-1, 1] z=0 to the window's limits. In other
words, a -1 -> 1 meter "window" in VWorld coordinates, located at the view
platform, maps to the window on the screen where there J3D is being displayed.
You can't really scale your scene using the cooexistence transform because it is
derived from the view model and physical device. Instead, use some of the other
tools you have available.
The simplest way to scale your scene is to put it into a TransformGroup and use
a scaling transform. Other ways to change the apparent size of your scene are
to move the view platform closer to your scene (i.e. get the observer closer to
your scene) or to use a smaller field of view on your view (i.e. have the
observer look at the scene through a telephoto lens).
I hope this is the information you were looking for,
Doug Gehringer
Sun Microsystems
===========================================================================
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".