Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

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


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: