public JumpPointParam(BaseGrid iGrid, GridPos iStartPos, GridPos iEndPos, DiagonalMovement iDiagonalMovement = DiagonalMovement.Always, HeuristicMode iMode = HeuristicMode.EUCLIDEAN)
            : base(iGrid, iStartPos, iEndPos, iDiagonalMovement, iMode)
        {
            openList = new IntervalHeap <Node>();

            CurIterationType = IterationType.LOOP;
        }
Exemple #2
0
        public ParamBase(BaseGrid iGrid, DiagonalMovement iDiagonalMovement, HeuristicMode iMode)
        {
            SetHeuristic(iMode);

            m_searchGrid     = iGrid;
            DiagonalMovement = iDiagonalMovement;
            m_startNode      = null;
            m_endNode        = null;
        }
Exemple #3
0
 public ParamBase(BaseGrid iGrid, GridPos iStartPos, GridPos iEndPos, DiagonalMovement iDiagonalMovement, HeuristicMode iMode) : this(iGrid, iDiagonalMovement, iMode)
 {
     m_startNode = m_searchGrid.GetNodeAt(iStartPos.x, iStartPos.y);
     m_endNode   = m_searchGrid.GetNodeAt(iEndPos.x, iEndPos.y);
     if (m_startNode == null)
     {
         m_startNode = new Node(iStartPos.x, iStartPos.y, true);
     }
     if (m_endNode == null)
     {
         m_endNode = new Node(iEndPos.x, iEndPos.y, true);
     }
 }
Exemple #4
0
        public void Reset(GridPos iStartPos, GridPos iEndPos, BaseGrid iSearchGrid = null)
        {
            _reset(iStartPos, iEndPos, iSearchGrid);
            m_startNode = null;
            m_endNode   = null;

            if (iSearchGrid != null)
            {
                m_searchGrid = iSearchGrid;
            }
            m_searchGrid.Reset();
            m_startNode = m_searchGrid.GetNodeAt(iStartPos.x, iStartPos.y);
            m_endNode   = m_searchGrid.GetNodeAt(iEndPos.x, iEndPos.y);
            if (m_startNode == null)
            {
                m_startNode = new Node(iStartPos.x, iStartPos.y, true);
            }
            if (m_endNode == null)
            {
                m_endNode = new Node(iEndPos.x, iEndPos.y, true);
            }
        }
Exemple #5
0
 internal abstract void _reset(GridPos iStartPos, GridPos iEndPos, BaseGrid iSearchGrid = null);
 internal override void _reset(GridPos iStartPos, GridPos iEndPos, BaseGrid iSearchGrid = null)
 {
     openList = new IntervalHeap <Node>();
     //openList.Clear();
 }