/// <summary> /// Calls the hydraulic erosion method to perform erosion on the chunkData's heightmap /// </summary> /// <param name="generator">The ChunkGenerator object which holds the array of chunkData objects</param> /// <param name="c">The chunkData object to perform erosion on</param> private static void HydraulicErosion(ChunkGenerator generator, ChunkData c) { c.SetHeightMap(generator.GetComponent <HydraulicAction> ().Erode(c)); /* * The hydraulic erosion algorithm requires the entire ChunkData object, not just the * terrain heightmap. This is because it needs access to the heat and rainfall maps too. */ }
/// <summary> /// Calls the diffusive erosion method to perform erosion on the chunkData's heightmap /// </summary> /// <param name="generator">The ChunkGenerator object which holds the array of chunkData objects</param> /// <param name="c">The chunkData object to perform erosion on</param> private static void DiffusiveErosion(ChunkGenerator generator, ChunkData c) { c.SetHeightMap(generator.GetComponent <DiffusiveErosion> ().Erode(c.GetHeightMap())); }