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: LineStripArray

Bill Hibbard wrote:
> 
> Hi Doug,
> 
> > 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:
> > . . .
> 
> Did you fill in VisADLineStripArray.stripVertexCounts?  Like this:
> 
>   ((VisADLineStripArray) array).stripVertexCounts = new int[1];
>   ((VisADLineStripArray) array).stripVertexCounts[0] = array.vertexCount;
> 
> If there is more than one strip in the array (i.e., lift the pen
> between strips) then the values in stripVertexCounts should sum
> to vertexCount.
> 

That's what I needed.

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: