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

Re: Displaying Slices of a DisplayImplJ3D

Hi Jose,

In your first scenario, don't call setRange() on the ScalarMap
to SelectRange, rather call getControl() to get its RangeControl
and call setRange() on that.  And do not call it setRange(slice,slice)
but rather with a low value at least a little less than the high value.
See visad/examples/Test21.java for a simple example.

In both scenarios, the ScalarMapsetRange(slice,slice) call will
create a degenerate display.  Given your question:

> I want an arbitrary slice of display1 Z-plane to be mapped into
> display2. Changes must be reflected in display2 when I add or
> remove a volume reference in display1.

See the answer from Unidata's VisAD mailing list archive at:

  http://www.unidata.ucar.edu/staff/russ/visad/msg00488.html

(this has the subject and from:
  Re: Question: Visualization of Function with Domain Dimension > 2,
    From: Bill Hibbard ")

Note to make display2 reflect changes in display1, you need to do
this logic whenever you call DisplayImpl.addReference() or
DisplayImpl.removeReference().  You can use CellImpl objects to
make computations in repsonse to changes in the values of data
objects.  Many of the VisAD demos have examples of using CellImpls.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html



 
 
  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