problems with DirectManipulationRendererJ3D

I am trying to create a toolbox that is able to modify shapefiles.
My first approach is the existing DirectManipulationRendererJ3D, but as
I try it with the code below, it gives me:

null: DirectManipulationRendererJ3D.doTransform in the lower left corner
of the display.

_________________________________________________________
            Coordinate[] tmpCoord = coords.elementAt(i);
            int np = tmpCoord.length;
            float[][] samples = new float[2][np];
            for (int j = 0; j < np; j++) {
                samples[0][j] = (float) tmpCoord[j].x;
                samples[1][j] = (float) tmpCoord[j].y;
            }

            // the lines
            Gridded2DSet tmpLines = new Gridded2DSet(earth, samples,
                    samples[0].length);
            // create a DataReference for river system
            DataReference rivers_ref = new DataReferenceImpl("rivers");
            rivers_ref.setData(tmpLines);

            ConstantMap[] colorMapLines = { new ConstantMap(1, Display.Red),
                    new ConstantMap(0, Display.Green),
                    new ConstantMap(0, Display.Blue),
                    new ConstantMap(3f, Display.LineWidth) };
            display1.addReferences(new DirectManipulationRendererJ3D(),
                    rivers_ref, colorMapLines);
_________________________________________________________

What am I doing wrong?

Regards,
Andrea
                    

==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


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