/** * Get the points connected to the given point. * * @param pt * The target point. * @param pl * The {@link PointList} in whioch to search. * @return the connected points. */ public Point2d[] getConnections(Point2d pt, PointList pl) { final int[] conns = getConnections(pl.points.indexOf(pt)); final Point2d[] pts = new Point2d[conns.length]; for (int i = 0; i < conns.length; i++) { pts[i] = pl.points.get(conns[i]); } return pts; }
final int[] conns = getConnections(id);