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.

LineStripArray

Hi,

How do I create a VisADLineStripArray? I have a list of coordinates and
I want a shape that connects the dots. I have used a VisADLineArray but
I have to list each coordinate twice:

shape.coordinates = new float[] {x1,y1,z1, x2,y2,z2,
                                 x2,y2,z2, x3,y3,z3};

Will a VisADLineStripArray allow me to do something like

shape.coordinates = new float[] {x1,y1,z1, x2,y2,z2, x3,y3,z3};

and if so, what should I use for vertexCount?

When I do the latter with vertexCount = 3, I get an error:

java.lang.NullPointerException:
        at
javax.media.j3d.GeometryStripArrayRetained.setStripVertexCounts(GeometryStripArrayRetained.java:37)
        at
javax.media.j3d.GeometryStripArray.<init>(GeometryStripArray.java:51)
        at javax.media.j3d.LineStripArray.<init>(LineStripArray.java:60)
        at
visad.java3d.DisplayImplJ3D.makeGeometry(DisplayImplJ3D.java:398)
...

Thanks,
Doug

-- 
*----------------------------------------------------------------------*
| Doug Lindholm, Software Engineer          |  E-mail: lind@xxxxxxxx   |
| Research Applications Program             |   Phone: 303-497-8374    |
| National Center for Atmospheric Research  |                          |
| P.O. Box 3000                             |     There's no place     |
| Boulder, Colorado 80307-3000              |        like $HOME        |
*----------------------------------------------------------------------*

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