/// <summary>Creates a new instance of PathEdge.</summary> /// <param name="path">The path finder that contains this edge.</param> /// <param name="nodeSrc">The source path node.</param> /// <param name="nodeDest">The destination path node.</param> public PathEdge(PathFinder path, int nodeSrc, int nodeDest) : this(path) { NodeSrc = nodeSrc; NodeDest = nodeDest; updateMath(); }
/// <summary>Creates a shallow copy of the PathFinder.</summary> /// <returns>A shallow copy of the PathFinder.</returns> public PathFinder Clone() { PathNode[,] grid = new PathNode[NumRows, NumCols]; for (int row = 0; row < NumRows; row++) { for (int col = 0; col < NumCols; col++) { grid[row, col] = Grid[row, col].Clone(); } } PathFinder clone = new PathFinder(grid, InWorld); return clone; }
/// <summary>Creates a new instance of PathEdge.</summary> /// <param name="path">The path finder that contains this edge.</param> public PathEdge(PathFinder path) { clear(); Path = path; }