NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: Delaunay and Java3D

I said:

>   RealType x = RealType.getRealType("x");
>   RealType y = RealType.getRealType("y");
>   RealType height = RealType.getRealType("height");
>   try {
>     RealTupleType xy = new RealTupleType(x, y);
>     Irregular2DSet set = new Irregular2DSet(xy, new float[][] {hox, rey});
>     float[][] samples = {hox, rey, heights};
>     RealTupleType xyh = new RealTupleType(x, y, height);
>     Irregular3DSet new_set = (Irregular3DSet)
>       set.makeSpatial(xyh, samples);
>     VisADTriangleStripArray array = new_set.make2DGeometry(null, false);
>   }

I neglected to say that you still need to copy the
coordinates, etc from the VisADTriangleStripArray to a
Java3d TriangleStripArray.  You can do this explicitly,
or by:

  DisplayImplJ3D display = new DisplayImplJ3D("dummy");
  TriangleStripArray new_array = (TriangleStripArray)
    display.makeGeometry(array);

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


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