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.

Re: Display of two objects

Hi Lourena,

> I have a single file containing information about a river salinity and
> bathymetry(the ground).
>
> I would like to:
> - read this file and create two different objects (ground and salinity
> volume);

Most file format adapters (e.g., Plain for netCDF) will
read a file as one Data object, but VisAD includes methods
for splitting data objects. Such as the extract() method
of Field, which lets you split a Field like:

  ((x, y) -> (salinity, bathymetry))

into:

  ((x, y) -> salinity)

and:

  ((x, y) -> bathymetry)

> - construct a scene graph with both;
> - display them together at a spreadsheet cell.

Just pass each Data object to the setData() method of
a different DataReferenceImpl, and pass those to the
addReference() methods of a single DisplayImpl. I am
not sure how to do this with SpreadSheet cells.

> I would also like to be able to manipulate them separately, for example,
> performing clipping at the volume
> representing the salinity, triangulating the bathymetry, or just showing
> one of them at a time, etc.

Clipping applies to the whole Display, not to individual
depicted Data objects. To clip only one, they would have
to be in side-by-side Displays.

Individually enabling and disabling their depiction can be
done with calls to the toggle() methods of their DataRenderers.

> I don't have much experience using VisAD, so don't know how to
> accomplish these tasks exactly.

The first order of business is to spend some time working
through Ugo's excellent tutorial.

> Should I custom a DataRenderer, DisplayRenderer and a ShadowType?

These are very advanced subjects. You can do almost everything
without thinking about such things. First study the tutorial.

Good luck,
Bill


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