protected void generateConnectionPath (N startNode, GraphPath<Connection<N>> outPath) { // Work back along the path, accumulating connections // outPath.clear(); while (current.node != startNode) { outPath.add(current.connection); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } // Reverse the path outPath.reverse(); }
currentEndNode = outPath.get(0).getToNode();
/** * @return Last triangle in the path. */ public Triangle getEndTriangle() { return (getCount() > 0) ? get(getCount() - 1).getToNode() : startTri; } }
currentEndNode = outPath.get(0).getToNode();
protected void generateNodePath (N startNode, GraphPath<N> outPath) { // Work back along the path, accumulating nodes // outPath.clear(); while (current.connection != null) { outPath.add(current.node); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } outPath.add(startNode); // Reverse the path outPath.reverse(); }
protected void generateConnectionPath (N startNode, GraphPath<Connection<N>> outPath) { // Work back along the path, accumulating connections // outPath.clear(); while (current.node != startNode) { outPath.add(current.connection); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } // Reverse the path outPath.reverse(); }
protected void generateNodePath (N startNode, GraphPath<N> outPath) { // Work back along the path, accumulating nodes // outPath.clear(); while (current.connection != null) { outPath.add(current.node); current = nodeRecords[graph.getIndex(current.connection.getFromNode())]; } outPath.add(startNode); // Reverse the path outPath.reverse(); }