MCPcopy Create free account
hub / github.com/graphhopper/graphhopper / DebugAStar

Class DebugAStar

tools/src/main/java/com/graphhopper/ui/DebugAStar.java:33–56  ·  view source on GitHub ↗

@author Peter Karich

Source from the content-addressed store, hash-verified

31 * @author Peter Karich
32 */
33public class DebugAStar extends AStar implements DebugAlgo {
34 private final GraphicsWrapper mg;
35 private Graphics2D g2;
36 private NodeAccess na;
37
38 public DebugAStar(Graph graph, Weighting type, TraversalMode tMode, GraphicsWrapper mg) {
39 super(graph, type, tMode);
40 this.mg = mg;
41 na = graph.getNodeAccess();
42 }
43
44 @Override
45 public void setGraphics2D(Graphics2D g2) {
46 this.g2 = g2;
47 }
48
49 @Override
50 public void updateBestPath(EdgeIteratorState es, SPTEntry bestEE, int currLoc) {
51 if (g2 != null) {
52 mg.plotEdge(g2, na.getLat(bestEE.parent.adjNode), na.getLon(bestEE.parent.adjNode), na.getLat(currLoc), na.getLon(currLoc), .8f);
53 }
54 super.updateBestPath(es, bestEE, currLoc);
55 }
56}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected