PointClickEngine::Navigation::AStarAlgorithm
Inherits Reference < Object
A* pathfinding algorithm implementation
The AStarAlgorithm class provides a pure implementation of the A* pathfinding algorithm. It uses a heuristic function to efficiently find optimal paths through a navigation grid while supporting various movement constraints.
Constructors
Instance methods
estimate_path_cost(start_x : Float32, start_y : Float32, end_x : Float32, end_y : Float32) : Float32
Estimates the cost of a path without finding it
find_partial_path(start_x : Float32, start_y : Float32, end_x : Float32, end_y : Float32, max_distance : Float32 = 100.0_f32) : Array(RL::Vector2) | Nil
Finds partial path when full path is not available
find_path(start_x : Float32, start_y : Float32, end_x : Float32, end_y : Float32) : Array(RL::Vector2) | Nil
Finds a path using A* algorithm
find_path_grid(start_x : Int32, start_y : Int32, end_x : Int32, end_y : Int32) : Array(Node) | Nil
Finds path between grid coordinates
heuristic_calculator
Sourceheuristic_calculator=(heuristic_calculator : HeuristicCalculator)
Sourcelast_search_time
Sourcelast_search_time=(last_search_time : Float64)
Sourcemax_search_nodes
Sourcemax_search_nodes=(max_search_nodes : Int32)
Sourcemovement_validator
Sourcemovement_validator=(movement_validator : MovementValidator)
Sourcepath_exists?(start_x : Float32, start_y : Float32, end_x : Float32, end_y : Float32) : Bool
Checks if a path exists without returning the full path