/// <summary> /// Initializes a new instance of the <see cref="PathingAStar"/> class. /// </summary> /// <param name="heapInitialSize">Initial size of the heap.</param> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="pathSmoother">The path smoother to use.</param> public PathingAStar(int heapInitialSize, IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths pathSmoother) : base(moveCostProvider, cellCostStrategy, pathSmoother) { _openSet = new BinaryHeap<IPathNode>(heapInitialSize, new PathNodeComparer()); _expandedSet = new List<IPathNode>(); _successorArray = new DynamicArray<IPathNode>(15); }
/// <summary> /// Initializes a new instance of the <see cref="PathingEngineBase"/> class. /// </summary> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="smoother">The path smoother to use</param> protected PathingEngineBase(IMoveCost moveCostProvider, ISmoothPaths smoother) { Ensure.ArgumentNotNull(moveCostProvider, "moveCostProvider"); Ensure.ArgumentNotNull(smoother, "smoother"); _costProvider = moveCostProvider; _smoother = smoother; }
/// <summary> /// Initializes a new instance of the <see cref="PathingEngineBase"/> class. /// </summary> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="smoother">The path smoother to use</param> protected PathingEngineBase(IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths smoother) { Ensure.ArgumentNotNull(moveCostProvider, "moveCostProvider"); Ensure.ArgumentNotNull(cellCostStrategy, "cellCostStrategy"); Ensure.ArgumentNotNull(smoother, "smoother"); _costProvider = moveCostProvider; _smoother = smoother; _cellCostStrategy = cellCostStrategy; _coroutineIter = new SafeIterator(this); }
/// <summary> /// Initializes a new instance of the <see cref="PathingEngineBase"/> class. /// </summary> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="cellCostStrategy">The cell cost provider.</param> /// <param name="smoother">The path smoother to use</param> /// <param name="requestPreprocessors">The list of request preprocessors to use.</param> protected PathingEngineBase(IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths smoother, IRequestPreProcessor[] requestPreprocessors) { Ensure.ArgumentNotNull(moveCostProvider, "moveCostProvider"); Ensure.ArgumentNotNull(cellCostStrategy, "cellCostStrategy"); Ensure.ArgumentNotNull(smoother, "smoother"); _costProvider = moveCostProvider; _smoother = smoother; _cellCostStrategy = cellCostStrategy; _coroutineIter = new SafeIterator(this); _segmentRequest = new SegmentRequest(); _segments = new DynamicArray <Path>(10); _requestPreprocessors = requestPreprocessors; }
/// <summary> /// Initializes a new instance of the <see cref="PathingJumpPointSearch"/> class. /// </summary> /// <param name="heapInitialSize">Initial size of the heap.</param> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="pathSmoother">The path smoother to use.</param> public PathingJumpPointSearch(int heapInitialSize, IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths pathSmoother) : base(heapInitialSize, moveCostProvider, cellCostStrategy, pathSmoother) { _neighbours = new DynamicArray<IPathNode>(8); }
/// <summary> /// Initializes a new instance of the <see cref="PathingAStar"/> class. /// </summary> /// <param name="heapInitialSize">Initial size of the heap.</param> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="cellCostStrategy">The cell cost provider.</param> /// <param name="pathSmoother">The path smoother to use.</param> /// <param name="requestPreprocessors">The list of request preprocessors to use.</param> public PathingAStar(int heapInitialSize, IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths pathSmoother, IRequestPreProcessor[] requestPreprocessors) : base(moveCostProvider, cellCostStrategy, pathSmoother, requestPreprocessors) { _openSet = new BinaryHeap <IPathNode>(heapInitialSize, new PathNodeComparer()); _expandedSet = new List <IPathNode>(); _successorArray = new DynamicArray <IPathNode>(15); }
/// <summary> /// Initializes a new instance of the <see cref="PathingJumpPointSearch"/> class. /// </summary> /// <param name="heapInitialSize">Initial size of the heap.</param> /// <param name="moveCostProvider">The move cost provider.</param> /// <param name="cellCostStrategy">The cell cost provider.</param> /// <param name="pathSmoother">The path smoother to use.</param> /// <param name="requestPreprocessors">The list of request preprocessors to use.</param> public PathingJumpPointSearch(int heapInitialSize, IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths pathSmoother, IRequestPreProcessor[] requestPreprocessors) : base(heapInitialSize, moveCostProvider, cellCostStrategy, pathSmoother, requestPreprocessors) { _neighbours = new DynamicArray <IPathNode>(8); }
public VisualizedJPS(int heapInitialSize, IMoveCost moveCostProvider, ICellCostStrategy cellCostStrategy, ISmoothPaths pathSmoother, IRequestPreProcessor[] requestPreprocessors) : base(heapInitialSize, moveCostProvider, cellCostStrategy, pathSmoother, requestPreprocessors) { }