Your zoom is probably implemented as moving towards and away from the
object. With parallel projection, the closeness of the viewpoint doesn't
change the view. It's as if you smashed the scene flat on the lens of the
camera. Lines going directly away from the plane of the camera appear as
points. The view frustrum is no longer a pyramid, but a cube.

If for parallel projection, you zoom by increasing and decreasing the size
of the scene (actually make the objects bigger and smaller) it would work as
you expect. I don't know Java3D very well, but there is a way to change the
size of the viewing cube instead of changing the size of the objects and
that might be conceptually easier than changing the size of the objects in
the scene graph.

John B.


-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of RWGRAY
Sent: Monday, March 25, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Projection Question


Default projection policy is PERSPECTIVE_PROJECTION.

I  changed this to PARALLEL_PROJECTION by

theSimpleUniverse.getViewer().getView().setProjectionPolicy(View.PARALLEL_PR
OJECTION);

I thought this would make cubes look a little flat.  That is, cubes wouldn't
look like they are being projected to a vanishing point in the distance.

But when I run the above code (no errors) I get a couple of lines displayed,
I guess from the cube's edges, instead of a cube or a square or anything
recognizable.  But I don't see a cube at all.  Just some lines. The lines
run off the edge of the screen/window.   And my zoom behavior does not work.
Why would it effect my zoom?  My zoom is working in that when I click my
button to return to PERSPECTIVE_PROJECTION after trying to zoom, I do see
the cube has zoomed.

That is: Start in PERSPECTIVE_PROJECTION.  A cube is displayed.  Looks O.K.
A little small.  Then click a button which sets the ProjectionPolicy to
PARALLEL_PROJECTION.  Now I have a couple of lines across the entire window.
Mouse zooming seems to do nothing.  Click button to return to
PERSPECTIVE_PROJECTION and I see the cube is now *very* small (result of the
zooming), but otherwise looks correct.

(Sorry for the bad description.  Very hard to describe what I am seeing.)

Are there other things I need to set to use PARALLEL_PROJECTION?

Anyone else have a problem?

Anyone have an example of using PARALLEL_PROJECTION?

Cheers,
Bob Gray

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