class fm2.fm2.FM2(mode: str = 'cpu')

The FM2 class contains all the methods for calculating a path with the Fast Marching Square Method.

Methods

set_map(self, fm2_map: FM2Map) -> None:

sets the map in which to calculate the path

get_path(self, starting_point: tuple[int, int] | tuple[int, int, int], goal_point: tuple[int, int] | tuple[int, int, int]) -> FM2Info:

gets the path given a start point and a goal point

get_path(start_point: tuple[int, int] | tuple[int, int, int], goal_point: tuple[int, int] | tuple[int, int, int]) FM2Info

returns the path given a start point and a goal point

Parameters:
start_pointtuple[int, int] | tuple[int, int, int]

the start point of the path

goal_pointtuple[int, int] | tuple[int, int, int]

the goal point of the path

Returns:
out~.entities.FM2Info

the info of the calculated path

set_map(fm2_map: FM2Map) None

sets the map in which to calculate the path

Parameters:
fm2_map~.entities.FM2Map

the specified map