public class LinePathConverter extends Object implements ch.sahits.game.openpatrician.engine.sea.IPathConverter
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.sea.TravellingVessels |
vessels |
| Constructor and Description |
|---|
LinePathConverter() |
| Modifier and Type | Method and Description |
|---|---|
long |
calculateDuration(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
ch.sahits.game.openpatrician.clientserverinterface.service.PathInterpolator interpolator,
double fraction)
No real implementation here.
|
javafx.scene.shape.Path |
createPath(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
List<javafx.geometry.Point2D> pointedPath,
double scale)
Create a path shape out of a list of points.
|
List<javafx.geometry.Point2D> |
reduceLinePoints(List<javafx.geometry.Point2D> initialPoints)
No actual reduction of points happens.
|
@Autowired private ch.sahits.game.openpatrician.model.sea.TravellingVessels vessels
public javafx.scene.shape.Path createPath(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
List<javafx.geometry.Point2D> pointedPath,
double scale)
createPath in interface ch.sahits.game.openpatrician.engine.sea.IPathConvertervessel - vessel that is traveling the path.pointedPath - input points.scale - scaling that is used on the path due to the sacle of the map.public List<javafx.geometry.Point2D> reduceLinePoints(List<javafx.geometry.Point2D> initialPoints)
reduceLinePoints in interface ch.sahits.game.openpatrician.engine.sea.IPathConverterinitialPoints - list of initial pointspublic long calculateDuration(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
ch.sahits.game.openpatrician.clientserverinterface.service.PathInterpolator interpolator,
double fraction)
calculateDuration in interface ch.sahits.game.openpatrician.engine.sea.IPathConvertervessel - that is travelinginterpolator - used to hold the path informationfraction - value between [0,1]. 1 means that the whole distance is traveled.Copyright © 2011-2016 Sahits GmbH. All Rights Reserved.