java.lang.NullPointerException at javax.media.j3d.GeometryArrayRetained.setCoordinates(GeometryArrayRetain ed.java:3650) at javax.media.j3d.GeometryArray.setCoordinates(GeometryArray.java:1067) at com.sun.j3d.utils.geometry.GeometryInfo.fillIn(GeometryInfo.java:2348) at com.sun.j3d.utils.geometry.GeometryInfo.getGeometryArray(GeometryInfo.ja va:2583) at com.sun.j3d.utils.geometry.GeometryInfo.getGeometryArray(GeometryInfo.ja va:2609)
Generated by the following section of code: if (floor[numButton] == true) { Point3f[] pts2 = new Point3f[4]; pts2[0] = gridPoints[(numButton + j)]; pts2[1] = gridPoints[(numButton + j + 1)];; pts2[2] = gridPoints[(numButton + j + detail + 1)];; pts2[3] = gridPoints[(numButton + j + detail + 2)];; int[] indices2 = { 0,1,3,2 }; GeometryInfo gi = new GeometryInfo(GeometryInfo.QUAD_ARRAY); gi.setCoordinates(pts2); gi.setCoordinateIndices(indices2); System.out.println("GETTING HERE"); floorShape[floorNum] = new Shape3D(); floorShape[floorNum].setGeometry(gi.getGeometryArray()); PolygonAttributes poly = new PolygonAttributes(); poly.setPolygonMode(PolygonAttributes.POLYGON_FILL); poly.setCullFace(PolygonAttributes.CULL_NONE); Appearance appear = new Appearance(); ColoringAttributes redColoring = new ColoringAttributes(green, ColoringAttributes.SHADE_FLAT); appear.setPolygonAttributes(poly); appear.setColoringAttributes(redColoring); floorShape[floorNum].setAppearance(appear); floorGroup[numButton].addChild(floorShape[floorNum]); } Can anyone tell me what I am doing wrong...a very similar piece of code works fine elsewhere in the program! The references to the gridPoints array locations are valid, that is not the problem. Any help would be much appreciated! ******************************************** Ben Logan - Graduate Software Engineer RCID Stephenson Building Newcastle Upon Tyne NE1 7RU www.rcid.ncl.ac.uk ******************************************** =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".