@Component @Lazy public class AStarGraphProvider extends BaseGraphCalulationService
imageService, map, pointInterner| Constructor | Description |
|---|---|
AStarGraphProvider() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addDestinationPoint(javafx.geometry.Point2D newPoint,
boolean isCity) |
Add a new destination Node to the graph.
|
protected double |
calculateWeight(javafx.geometry.Point2D from,
javafx.geometry.Point2D to) |
Calculate the weight between two nodes.
|
GraphAStar<javafx.geometry.Point2D> |
getGraph() |
|
void |
initGraph(ch.sahits.game.openpatrician.event.data.HeuristicGraphInitialisationComplete event) |
getPoint, getSegments, getTangentialSegments, isOnSeapublic void initGraph(ch.sahits.game.openpatrician.event.data.HeuristicGraphInitialisationComplete event)
public void addDestinationPoint(javafx.geometry.Point2D newPoint,
boolean isCity)
newPoint - new location to add to the graphisCity - flag indicating if the new location is a city, which means the coordinates
may not be located in the sea area.protected double calculateWeight(javafx.geometry.Point2D from,
javafx.geometry.Point2D to)
BaseGraphCalulationServicecalculateWeight in class BaseGraphCalulationServicefrom - source nodeto - destination nodefrom to topublic GraphAStar<javafx.geometry.Point2D> getGraph()
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.