コード例 #1
0
 public static void SetClusterId(ClusterIdList clusterIdList,Map map)
 {
     clusterIdList.Reset();
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             map.map[i, j].ClusterId = -1;                
         }
     }
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             if (map.map[i, j].ClusterId == -1 && map.map[i, j].BaseMass != 0)
             {
                 SetClusterId(new int[2] { i, j }, clusterIdList.GetNewClusterId(),map);
             }
         }
     }
 }
コード例 #2
0
 public static void SetClusterId(ClusterIdList clusterIdList, Map map)
 {
     clusterIdList.Reset();
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             map.map[i, j].ClusterId = -1;
         }
     }
     for (int i = 0; i < map.Height; i++)
     {
         for (int j = 0; j < map.Width; j++)
         {
             if (map.map[i, j].ClusterId == -1 && map.map[i, j].BaseMass != 0)
             {
                 SetClusterId(new int[2] {
                     i, j
                 }, clusterIdList.GetNewClusterId(), map);
             }
         }
     }
 }
コード例 #3
0
 public static void SetClusterId(int[] coords,ClusterIdList clusterIdList,Map map) => SetClusterId(coords,clusterIdList.GetNewClusterId(),map);
コード例 #4
0
 public void SetClusterIdList(ClusterIdList idList)
 {
     clusterIdList = idList.clusterIdList;
     clusterIdListSize = idList.clusterIdListSize;
 }
コード例 #5
0
 public void SetClusterIdList(ClusterIdList idList)
 {
     clusterIdList     = idList.clusterIdList;
     clusterIdListSize = idList.clusterIdListSize;
 }
コード例 #6
0
 public static void SetClusterId(int[] coords, ClusterIdList clusterIdList, Map map) => SetClusterId(coords, clusterIdList.GetNewClusterId(), map);