Re: Applying shapes in animation

Hi,

> If you want a cube at each point, pass 'new Integer1DSet(1)' to
> setShapeSet(), then construct a cube as in visad/examples/Test47.java
> and pass it in a singleton array to setShapes(). You can map 'x'
> to Shape, since the Integer1DSet(1) with one member means that 'x'
> values are ignored.

I keep getting java.lang.NullPointerException for the following code:

 ScalarMap shape_map = new ScalarMap(x,Display.Shape);
 VisADGeometryArray[] shapes;
 shapes = new VisADGeometryArray[max_points];
 for(int i=0;i<max_points;i++)
     {
  shapes[i] = makeCube();
     }
 ShapeControl shape_control = (ShapeControl) shape_map.getControl();
 shape_control.setShapeSet(new Integer1DSet(1)); // ERROR on this line
 shape_control.setShapes(shapes);

Do I have to seperately set the values for Integer1DSet?
Jay