ch.sahits.game.openpatrician.engine.sea.IPathConverterpublic class LinePathConverter
extends java.lang.Object
implements ch.sahits.game.openpatrician.engine.sea.IPathConverter
| Constructor | Description |
|---|---|
LinePathConverter() |
| Modifier and Type | Method | 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.
|
java.util.Optional<javafx.scene.shape.Path> |
createPath(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
java.util.List<javafx.geometry.Point2D> pointedPath,
double scale) |
Create a path shape out of a list of points.
|
java.util.List<javafx.geometry.Point2D> |
reduceLinePoints(java.util.List<javafx.geometry.Point2D> initialPoints) |
No actual reduction of points happens.
|
public java.util.Optional<javafx.scene.shape.Path> createPath(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel,
java.util.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 java.util.List<javafx.geometry.Point2D> reduceLinePoints(java.util.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-2018 Sahits GmbH. All Rights Reserved.