Ejemplo n.º 1
0
        private void _InitRegion()
        {
            if (m_quadtree == null)
            {
                return;
            }
            m_lstRegions.Clear();
            //m_lstIgnore.Clear();

            m_leaves = m_quadtree.GetAllLeaves();

            for (int i = 0; i < m_leaves.Count; ++i)
            {
                QuadtreeLeaf leaf = m_leaves[i];

                CombineRegion combineRegion = new CombineRegion();
                combineRegion.Init();

                for (int j = 0, count = leaf.objects.Count; j < count; ++j)
                {
                    CombineMeshData data = new CombineMeshData(leaf.objects[j]);
                    combineRegion.AddCombineData(data);
                }
                m_lstRegions.Add(combineRegion);
            }
        }
Ejemplo n.º 2
0
        public void OnSelectObjectChange()
        {
            if (m_selectMat == null)
            {
                return;
            }

            lstData.Clear();

            for (int i = 0; i < Selection.gameObjects.Length; ++i)
            {
                CombineMeshData combineData = new CombineMeshData(Selection.gameObjects[i]);
                combineData.bSelect = true;

                /*
                 * if (!combineData.CanCombine()) {
                 *  EditorUtility.DisplayDialog("", string.Format("{0} 不支持合并", combineData.GetName()), "OK");
                 *  CombineRegionMgr.Instance.SetSelections(m_dictMatObjs[m_selectMat]);
                 *  return;
                 * }*/
                lstData.Add(combineData);
            }

            Repaint();
        }