Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / September 2004

Tip: Looking for answers? Try searching our database.

Zoom with a parallel projection

Thread view: 
maya2000 - 24 Sep 2004 15:12 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.