Example #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);
             }
         }
     }
 }
Example #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);
             }
         }
     }
 }
Example #3
0
 public static void SetClusterId(int[] coords,ClusterIdList clusterIdList,Map map) => SetClusterId(coords,clusterIdList.GetNewClusterId(),map);
 public void SetClusterIdList(ClusterIdList idList)
 {
     clusterIdList = idList.clusterIdList;
     clusterIdListSize = idList.clusterIdListSize;
 }
Example #5
0
 public void SetClusterIdList(ClusterIdList idList)
 {
     clusterIdList     = idList.clusterIdList;
     clusterIdListSize = idList.clusterIdListSize;
 }
Example #6
0
 public static void SetClusterId(int[] coords, ClusterIdList clusterIdList, Map map) => SetClusterId(coords, clusterIdList.GetNewClusterId(), map);