public PathFinder(int[,,] grid, IPathRequiment pathRequiment) { if (grid == null) { throw new Exception("Grid cannot be null"); } mGrid = grid; mCLZdist = pathRequiment.Clearance; mANGlength = pathRequiment.MinAngleDistance; }
public static List <PathFinderNode> GetPathByMap(IMap Map, IPathRequiment pathRequiment) { List <PathFinderNode> path = new List <PathFinderNode>(); List <sbyte[, ]> searchPlanes = ElementPosition.GetPlane(Map.Start, Map.Goal); PathFinder mPathFinder = new PathFinder(Map.Matrix, pathRequiment); foreach (sbyte[,] item in searchPlanes) { path = mPathFinder.FindPath(Map.Start, Map.Goal, item); if (path != null) { return(path); } } return(path); }