PickManipulationRenderer, attaining x,y,z coordinates

Hi Bill, all:

I'm trying to retrieve the x,y,z coordinates of a point in the 3D Panel
every time the user right clicks on the mouse.  Clearly this information is
being computed somewhere, because it's displayed in the upper left of the
display when both mouse keys are pressed.  But how to retrieve that info
programmatically?  I tried using a PickManipulationRenderer - and it does
allow me to get the index of the coordinates -- but it has the effect of
turning my volume rendered image into a grid of points, one per member of
the domain set.  This point grid is colored according to the displayType of
the associated ScalarMap, except that each and every point is visible,
regardless of alpha value.

Here's the code (it's been adapted from Test61):

    ScalarMap map1color = new ScalarMap(wr, Display.RGBA);
    dpys[0].addMap(map1color);

    DataReferenceImpl ref_grid3d = new DataReferenceImpl("ref_grid3d");
    ref_grid3d.setData(linear_ff);

    final PickManipulationRendererJ3D pick = new
PickManipulationRendererJ3D();
    ((DisplayImplJ3D)dpys[0]).addReferences(pick, ref_grid3d);

    CellImpl cellt = new CellImpl() {
      public void doAction() throws VisADException, RemoteException {
        System.out.println("index = " + pick.getCloseIndex());

      }

    };

    cellt.addReference(ref_grid3d);


appreciate any help!

Brad Buchsbaum


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