public void Init(int pathSearchNodeMax, GridMapMgr mapMgr)
        {
            m_mapMgr = mapMgr;

            m_nodePool = new NodePool(pathSearchNodeMax);

            m_open_node_hash_list  = new BitArray(m_mapMgr.MAP_LENGTH_X * m_mapMgr.MAP_WIDTH_Z, false);
            m_close_node_hash_list = new BitArray(m_mapMgr.MAP_LENGTH_X * m_mapMgr.MAP_WIDTH_Z, false);

            m_open_list.Capacity  = m_mapMgr.MAP_WIDTH_Z * m_mapMgr.MAP_LENGTH_X;
            m_close_list.Capacity = m_mapMgr.MAP_WIDTH_Z * m_mapMgr.MAP_LENGTH_X;
        }
Example #2
0
        public void Init(float oneStep, float maxUnitSize)
        {
            m_oneStep = oneStep;

            s_maxUnitSize = maxUnitSize;
            s_maxNeighborDistanceTakeInCount = s_maxUnitSize * 10;

            /* Specify the global time step of the simulation. */
            RVO.Simulator.Instance.setTimeStep(m_oneStep);

            m_mapMgr = new GridMapMgr();

            m_pathFinder = new GridPathFinder();
        }