public void visit(PointSet p) { // Following code should only be activated if we have listeners installed to update // the bounding box when it goes out of date. if (checkForBoundingBox(p)) return; Object domain = p.getGeometryAttributes(GeometryUtility.HEIGHT_FIELD_SHAPE); if (domain != null && domain instanceof Rectangle2D) { Rectangle2D box = (Rectangle2D) domain; double[][] data = p.getVertexAttributes(Attribute.COORDINATES).toDoubleArrayArray(null); double[][] zbnds = new double[2][1]; Rn.calculateBounds(zbnds, data); double[][] xyzbnds = new double[2][3]; xyzbnds[0][0] = box.getMinX(); xyzbnds[1][0] = box.getMaxX(); xyzbnds[0][1] = box.getMinY(); xyzbnds[1][1] = box.getMaxY(); xyzbnds[0][2] = zbnds[0][0]; xyzbnds[1][2] = zbnds[1][0]; if (Double.isNaN(xyzbnds[0][0])) throw new IllegalStateException("Nan"); Rectangle3D box3 = new Rectangle3D(xyzbnds); unionBox(box3); return; } DataList vv = p.getVertexAttributes(Attribute.COORDINATES); if (vv == null) { // signal error return; } unionVectors(vv); }