Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

AW: How can I change between displaying 2D or 3D objects

Hi Erik,

As far as I know there is no possibility to switch one DisplayImpl into
another. But you can construct a DisplayImplJ3D that behaves like a
DisplayImplJ2D:

DisplayImplJ3D display = new DisplayImplJ3D("display", new
TwoDDisplayRendererJ3D());

Visad then constructs a Java3D display that behaves like a 2D-display.
So you have full hardware acceleration even in 2D.

Nevertheless if you want to switch between 2D and 3D you have to
construct 2 separate displays. You can add both of them to your gui and
set only one of them visible at a time.

Another way would be to remove the old display and add the new to your
gui. See http://www.unidata.ucar.edu/staff/russ/visad/msg05454.html for
that.

Cheers, Mathias


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690