Re: newbie questions

Hi John,

> Is there support for displaying vector data in VisAD?  If not, is there
> anyone who has managed to pull it off?  If not, is there anyone who
> could point me in the right direction (i.e. should I just create a VisAD
> LineStripArray) ?

In addition to Doug's application, you can find vector rendering
in visad/examples/Test28.java and visad/aune/ShallowFluid.java.

The visad.bom package, distributed with VisAD, includes custom
wind barb DataRenderers. In particular, the command
'java visad.bom.BarbManipulationRendererJ2D' lets you alter wind
barbs by clicking on the tails with the right mouse button and
dragging.  With the SHIFT key changes wind barb direction, without
the SHIFT key changes wind barb speed.

> If I want to add a Java3D object to the VisAD scene graph, how do I do
> it?

This is a bit tricky, since VisAD is designed to support multiple
graphics APIs and different APIs have difference scene graph
structures.  Currently VisAD supports Java3D and Java2D.  Given
a DisplayImplJ3D display, do this:

  DisplayRendererJ3D dr
    (DisplayRendererJ3D) display.getDisplayRenderer();
  TransformGroup trans = dr.getTrans();

Then you can add a Java3D BranchGroup to trans (only a BranchGroup,
since trans is live).

Java2D does not define a scene graph, so VisAD invented one for it
based on the Java3D scene graphs.  Given a DisplayImplJ2D display,
do this:

  DisplayRendererJ2D dr
    (DisplayRendererJ2D) display.getDisplayRenderer();
  VisADGroup root = dr.getRoot();

Then you can use the method of VisADGroup:

  public void addChild(VisADSceneGraphObject child)

to add VisADSceneGraphObjects to the scene graph.  However, I
assume that it is Java3D scene graphs that you are interested in.

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