Class PathFinder
java.lang.Object
de.gurkenlabs.litiengine.entities.behavior.PathFinder
- Direct Known Subclasses:
AStarPathFinder
public abstract class PathFinder
extends java.lang.Object
Constructor Summary
Constructors Constructor Description PathFinder()
Method Summary
Modifier and Type Method Description protected java.awt.geom.Rectangle2D
applyPathMargin(ICollisionEntity entity, java.awt.geom.Rectangle2D rectangle)
protected Path
findDirectPath(java.awt.geom.Point2D start, java.awt.geom.Point2D target)
abstract Path
findPath(IMobileEntity start, java.awt.geom.Point2D target)
Gets the path.protected boolean
intersectsWithAnyCollisionBox(ICollisionEntity entity, java.awt.geom.Point2D start, java.awt.geom.Point2D target)
Constructor Details
PathFinder
public PathFinder()
Method Details
findPath
Gets the path.- Parameters:
start
- the starttarget
- the goal- Returns:
- the path
findDirectPath
applyPathMargin
protected java.awt.geom.Rectangle2D applyPathMargin(ICollisionEntity entity, java.awt.geom.Rectangle2D rectangle)intersectsWithAnyCollisionBox
protected boolean intersectsWithAnyCollisionBox(ICollisionEntity entity, java.awt.geom.Point2D start, java.awt.geom.Point2D target)