numerical_floodfill

Function numerical_floodfill 

Source
pub fn numerical_floodfill(
    origins: &Vec<RoomXY>,
    obstacles: &LocalCostMatrix,
    max_distance: u16,
) -> LargeCostMatrix
Expand description

Generates a distance floodfill from origin positions.

Takes a Vec of origin locations to start the floodfill from, and a Cost Matrix of obstacles, and produces a LargeCostMatrix with distances for all positions that can be reached from the origin points.

The obstacles Cost Matrix should have u8::MAX set on all positions that are obstacles, and 0 everywhere else.