Hi,

I guess one of your problem is that for PARALLEL_PROJECTION
you have to zoom in a different way. It does not work to move the
view back as you do for the default view projection. Just remember
that your view zoom must be correct as well, otherwise the scene
may be outside the viewing bounds and will not be visible.

Here's the code I use for zooming in PARALLEL_PROJECTION:

 public void changeZoom(double zoom)
 {
   Canvas3D c = view.getCanvas3D(0);
   Screen3D s = c.getScreen3D();
   double w = s.getPhysicalScreenWidth();

   double scale = w / (zeroZoomDivider + zoom);

   view.setScreenScale(scale);
 }

I don't know if this is the correct way of doing this, but it seems to
work :-)


Best Regards

Roger Berggren


A. Murat Tanyer wrote:

 Dear all,

I have two problems about viewing my scene: My scene has a bounds with a
center (x,y,z) and with a radius of r. What I am doing is creating a
viewplatform (at 0,0,0) and rotate it a little bit to see my scene in 3D
(PI/6), translate it to my center and move it a little bit back to view
the objects.

Two questions:

1) I need to view my scene not in perspective but in parallel
projection. If I apply
planView.setProjectionPolicy(View.PARALLEL_PROJECTION);
I see that my canvas is full of one object; I can't see the scene (see
orto.jpg). But if I do not use this method I see the scene correctly
(but in perspective ofcourse; see pers.jpg). What should I do to view in
parallel projection?

2) When I run my application for the first time, the canvases on each
tab does not show my scene immediately. If click to the second tab and
come back to the first tab I could be able to see my scene. Is this a bug?

I am using j2sdk1.4.0_01 and java3d-1_3-beta2-windows-i586-opengl-sdk

Thanks
Ali

- att-1.htm
- orto.jpg
- pers.jpg

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