Parallel Projection View Zoom-out?

I’ve been messing around with View and ViewPlatform to try to see a flat XY view (viewing straight down the XY plane’s normal in the negative z direction). I think that Parallel Projection is supposed to do this, and that you can do it with
canvas3D.getView().setProjectionPolicy(View.PARALLEL_PROJECTION);

When I try that, it seems to work, but it makes my view zoom all the way in. So I try the following to make my camera zoom out a bit (vpTG is the universe’s ViewingPlatform’s ViewPlatformTransform):


Transform3D T3D = new Transform3D();
Vector3f translate = new Vector3f();
translate.set(10.0f, 10.0f, 60.0f);
T3D.setTranslation(translate);
vpTG.setTransform(T3D);

This seems to have no effect however. Any suggestions on what I might be doing wrong? Or perhaps a better way to zoom out (move my camera more toward the +z direction while still facing the XY plane)?

Thanks,
DAT

In perspective project your field of view is in the shape of a cone. This means far away from the camera the edges are far apart. In this case zoom is like how far forward the camera is.

In Parallel projection the field of view is more like a rectangle. Far away, the edges are the same distance apart. In this case zoom has no effect.

I think the answer to your question is to try to scale the size of the camera but I don’t know for sure. I’ve haven’t done it, yet.

Solved it by doing this:

View.setScreenScalePolicy( View . SCALE_EXPLICIT );
View.setScreenScale( x );

:slight_smile:

Hm actually…I tried my program on another computer, and even though I didn’t change any code, the screen was a little more zoomed in than it was before. I think this may be due to the fact that I’m using setScreenScale, and the other computer’s monitor/res. is different from mine? In any case, this is not good because I will have different behavior on different machines.

Anyone know another way to scale the camera/view so I have consistent behavior across different platforms/machines?