Class Path

java.lang.Object
de.gurkenlabs.litiengine.entities.behavior.Path

public class Path extends Object
Represents a path consisting of a series of points.
  • Constructor Details

    • Path

      public Path(Path2D path)
      Constructs a Path object from a given Path2D object.
      Parameters:
      path - the Path2D object representing the path.
    • Path

      public Path(Point2D start, Point2D target, Path2D path, List<Point2D> points)
      Constructs a Path object with specified start and target points, Path2D object, and list of points.
      Parameters:
      start - the starting point of the path.
      target - the target point of the path.
      path - the Path2D object representing the path.
      points - the list of points that make up the path.
  • Method Details

    • getPath

      public Path2D getPath()
      Gets the Path2D object representing the path.
      Returns:
      the Path2D object.
    • getPoints

      public List<Point2D> getPoints()
      Gets the list of points that make up the path.
      Returns:
      the list of points.
    • getStart

      public Point2D getStart()
      Gets the starting point of the path.
      Returns:
      the starting point.
    • getTarget

      public Point2D getTarget()
      Gets the target point of the path.
      Returns:
      the target point.