Hi All,
I use PointArray to display some points. I set coordinates of these
points successfully , but when I set
the colors of these points, an exception is generated, and it says:"
java.lang.ArrayIndexOutOfBoundsException: GeometryArray: color array
bounds exceeded".
In fact, the array index is not out of bounds, and i can display their
values. I don't know why. Who has
such experience ? I will be appreciated at any suggestions !
Thanks!
-WuGang
---------------------------segment of the program------------------
PointArray pa = new PointArray(10000, PointArray.COORDINATES +
PointArray.COLOR_3 + PointArray.ALLOW_COLOR_WRITE +
PointArray.ALLOW_COORDINATE_WRITE);
/* System.out.println(coords[0].toString());
System.out.println(coords[1].toString());
System.out.println(coords[2].toString());
System.out.println(coords[3].toString());
System.out.println(colors[0].toString());
System.out.println(colors[1].toString());
System.out.println(colors[2].toString());
System.out.println(colors[3].toString());
*/
pa.setCoordinates(0, coords, 0, VertexCount );
pa.setColors(0, colors, 0, VertexCount );
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/