Package ai.path

Class Node<Position>

java.lang.Object
ai.path.Node<Position>
Direct Known Subclasses:
Vector2fNode

public abstract class Node<Position> extends Object
A Node describes a single node of a finite graph and does knows all paths to its neighbors. It is a container for any external position data for using in a Map for a pathfinding algorithm.
Since:
08.07.2021
Author:
Juyas
  • Constructor Details

    • Node

      public Node()
  • Method Details

    • position

      public abstract Position position()
      The external position data contained in this node. The exact value of this method is ignored by the pathfinding algorithms, but may be used to calculate relationship data between nodes using an external algorithm.
      Returns:
      the position data chosen for this node
    • paths

      public abstract List<Path<Position>> paths()
      All paths starting at this node.
      Returns:
      all paths starting at this node
    • getMarker

      public final ai.path.Node.Marker<Position> getMarker()
    • setMarker

      public final void setMarker(ai.path.Node.Marker<Position> marker)
    • hasMarker

      public final boolean hasMarker()