break; case PathIterator.SEG_CLOSE: coordList.closeRing(); pathIt.next(); isDone = true;
private Coordinate[] computeOctRing(Coordinate[] inputPts) { Coordinate[] octPts = computeOctPts(inputPts); CoordinateList coordList = new CoordinateList(); coordList.add(octPts, false); // points must all lie in a line if (coordList.size() < 3) { return null; } coordList.closeRing(); return coordList.toCoordinateArray(); }
public void visit(QuadEdge[] triEdges) { coordList.clear(); for (int i = 0; i < 3; i++) { Vertex v = triEdges[i].orig(); coordList.add(v.getCoordinate()); } if (coordList.size() > 0) { coordList.closeRing(); Coordinate[] pts = coordList.toCoordinateArray(); if (pts.length != 4) { //checkTriangleSize(pts); return; } triCoords.add(pts); } }
private Coordinate[] computeOctRing(Coordinate[] inputPts) { Coordinate[] octPts = computeOctPts(inputPts); CoordinateList coordList = new CoordinateList(); coordList.add(octPts, false); // points must all lie in a line if (coordList.size() < 3) { return null; } coordList.closeRing(); return coordList.toCoordinateArray(); }
private Coordinate[] getBoundary(int level, Coordinate origin, double width) { double y = origin.y; // for all levels beyond 0 need to vertically shift shape by height of one "arm" to centre it if (level > 0) { y += THIRD_HEIGHT * width; } Coordinate p0 = new Coordinate(origin.x, y); Coordinate p1 = new Coordinate(origin.x + width/2, y + width * HEIGHT_FACTOR); Coordinate p2 = new Coordinate(origin.x + width, y); addSide(level, p0, p1); addSide(level, p1, p2); addSide(level, p2, p0); coordList.closeRing(); return coordList.toCoordinateArray(); }
coordList.closeRing();