예제 #1
0
    public void Triangulate()
    {
        // clear old data
        terrain.Clear();
        rivers.Clear();
        roads.Clear();
        water.Clear();
        waterShore.Clear();
        estuaries.Clear();
        features.Clear();
        // triangulate cells
        for (int i = 0; i < cells.Length; ++i)
        {
            Triangulate(cells[i]);
        }

        //reset mesh
        terrain.Apply();
        rivers.Apply();
        roads.Apply();
        water.Apply();
        waterShore.Apply();
        estuaries.Apply();
        features.Apply();
    }
예제 #2
0
    public void TriangulateAllCells()
    {
        // This method could be invoked at any time, even when cells have already been triangulated earlier.
        // So we should begin by clearing the old data.
        Terrain.Clear();
        Rivers.Clear();
        Roads.Clear();
        Water.Clear();
        WaterShore.Clear();
        Estuaries.Clear();
        Features.Clear();

        for (int i = 0; i < _cells.Length; i++)
        {
            Precalculation(_cells[i]);
        }

        for (int i = 0; i < _cells.Length; i++)
        {
            TriangulateCell(_cells[i]);
            AddFeatures(_cells[i]);
        }

        Terrain.Apply();
        Rivers.Apply();
        Roads.Apply();
        Water.Apply();
        WaterShore.Apply();
        Estuaries.Apply();
        Features.Apply();
    }
 public void Triangulate()
 {
     terrain.Init();
     water.Init();
     waterShore.Init();
     featureManager.Init();
     for (int i = 0; i < cells.Length; i++)
     {
         Triangulate(cells[i]);
     }
     terrain.Apply();
     water.Apply();
     waterShore.Apply();
     featureManager.Apply();
 }
예제 #4
0
 public void Triangulate()
 {
     terrain.Clear();
     rivers.Clear();
     roads.Clear();
     water.Clear();
     waterShore.Clear();
     estuaries.Clear();
     features.Clear();
     politicalBorders.Clear();
     for (int i = 0; i < cells.Length; i++)
     {
         Triangulate(cells[i]);
     }
     terrain.Apply();
     rivers.Apply();
     roads.Apply();
     water.Apply();
     waterShore.Apply();
     estuaries.Apply();
     features.Apply();
     politicalBorders.Apply();
 }