Hello,
I am trying to toggle between perspective and parallel view modes. In
parallel mode zoom doesn't work. I tried below code to mimic a zoom
effect
public void setCanvasView(String view) {
if(view=="Perspective")
canvas3D.getView().setProjectionPolicy(View.PERSPECTIVE_PROJECTION);
else {
canvas3D.getView().setProjectionPolicy(View.PARALLEL_PROJECTION);
canvas3D.getView().setScreenScalePolicy(View.SCALE_EXPLICIT);
canvas3D.getView().setScreenScale(0.17);
// TransformGroup to hold scale transform.
// This doesn't work neither.
// matrix.setScale(canvas3D.getView().getScreenScale());
// tg.setTransform(matrix);
}
}
When I zoom an object in parallel mode, nothing changed, but if I
toggle to perspective mode I can see the object is zoomed. When I back
to parallel mode again, the object scale is back to original. It seems
the scale doesn't update parallel mode only. How can I update parallel
view?
Thanks for your help.
Sungwoo
maya2000 - 28 Sep 2004 19:56 GMT
> Hello,
> I am trying to toggle between perspective and parallel view modes. In
[quoted text clipped - 23 lines]
>
> Sungwoo
I found a MouseScale.java from sun which works very well for my
purpose. I don't know why this is not a part of java3D. You can get it
from below link.
http://archives.java.sun.com/cgi-bin/wa?A2=ind0001&L=java3d-interest&F=&S=&P=51482
Sungwoo