// --------------------------------------------------------------------------------

        public void UpdateMigrants()
        {
            if (m_octTree == null)
            {
                return;
            }

            m_octTree.CaptureMigrants(m_migrants);
            m_currentMigrants = m_migrants.Count;
            m_migrants.Clear();
        }
Beispiel #2
0
        // ----------------------------------------------------------------------------

        private void UpdateMigration()
        {
            if (m_octTree == null)
            {
                return;
            }

            // capture migrants
            m_octTree.CaptureMigrants(m_migrants);

            // redistribute migrants
            for (int i = 0; i < m_migrants.Count; ++i)
            {
                m_octTree.Insert(m_migrants[i]);
            }

            // clear migrants worker list
            m_migrants.Clear();

            if (m_statistics != null)
            {
                m_statistics.UpdateMigrants();
            }
        }