> Date: Fri, 3 Jan 2003 02:26:53 -0700
> From: Elisabeth Thorsen <[EMAIL PROTECTED]>
>
> I want to zoom using setScreenScale but the shape is fixed in size although I
> change the scale. The only thing that happens is that the shape is moving in
> and out of the clipping pane.  I called the setScreenScalePolicy() method of
> the view with the View.SCALE_EXPLICIT policy before I set the screen scale.

setScreenScale() modifies the virtual-to-physical scale and scales about the
view platform origin.  However, the default viewing configuration uses a
perspective projection with the virtual eyepoint at the origin of the view
platform.  (Effected by the default values for the projection, window eyepoint,
and view attach policies).

So if for instance you scale larger, then objects in the virtual world are
growing larger with respect to the physical world (the screen/window), but
they're also moving further away from the physical eyepoint.  The net effect is
no apparent change in the size of the projected perspective image in the
physical window.

The shape is moving in and out of the clip plane because you've probably left
the front and back clip policies at the default PHYSICAL_EYE policy, so they're
fixed with respect to the physical coordinates of the eyepoint.

> Does anyone know what I have to do? (I don't want to change the location of
> the eyepoint in order to effect a zoom.)

With the default RELATIVE_TO_FIELD_OF_VIEW window eyepoint policy you can just
call View.setFieldOfView() to effect a zoom.  This will automatically set the
physical eyepoint at the correct centered distance from the window to get the
desired field of view.

This won't change the location of the eyepoint in the virtual world; it will
still remain at the origin of the view platform as long as the window eyepoint
policy remains the default RELATIVE_TO_FIELD_OF_VIEW and the view attach policy
remains the default NOMINAL_HEAD.

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

Reply via email to