public void setFullHydraulicErosionPreset(fullHydraulicErosionPresetData preset) { erosionTypeInt = 1; erosionType = ErosionType.Hydraulic; hydraulicTypeInt = 1; hydraulicType = HydraulicType.Full; hydraulicIterations = preset.hydraulicIterations; hydraulicRainfall = preset.hydraulicRainfall; hydraulicEvaporation = preset.hydraulicEvaporation; hydraulicSedimentSolubility = preset.hydraulicSedimentSolubility; hydraulicSedimentSaturation = preset.hydraulicSedimentSaturation; }
public void setVelocityHydraulicErosionPreset(velocityHydraulicErosionPresetData preset) { erosionTypeInt = 1; erosionType = ErosionType.Hydraulic; hydraulicTypeInt = 2; hydraulicType = HydraulicType.Velocity; hydraulicIterations = preset.hydraulicIterations; hydraulicVelocityRainfall = preset.hydraulicVelocityRainfall; hydraulicVelocityEvaporation = preset.hydraulicVelocityEvaporation; hydraulicVelocitySedimentSolubility = preset.hydraulicVelocitySedimentSolubility; hydraulicVelocitySedimentSaturation = preset.hydraulicVelocitySedimentSaturation; hydraulicVelocity = preset.hydraulicVelocity; hydraulicMomentum = preset.hydraulicMomentum; hydraulicEntropy = preset.hydraulicEntropy; hydraulicDowncutting = preset.hydraulicDowncutting; }
public void setFastHydraulicErosionPreset(fastHydraulicErosionPresetData preset) { erosionTypeInt = 1; erosionType = ErosionType.Hydraulic; hydraulicTypeInt = 0; hydraulicType = HydraulicType.Fast; hydraulicIterations = preset.hydraulicIterations; hydraulicMaxSlope = preset.hydraulicMaxSlope; hydraulicFalloff = preset.hydraulicFalloff; }
public void FullHydraulicErosion(int iterations, float rainfall, float evaporation, float solubility, float saturation) { erosionTypeInt = 1; erosionType = ErosionType.Hydraulic; hydraulicTypeInt = 1; hydraulicType = HydraulicType.Full; hydraulicIterations = iterations; hydraulicRainfall = rainfall; hydraulicEvaporation = evaporation; hydraulicSedimentSolubility = solubility; hydraulicSedimentSaturation = saturation; neighbourhood = Neighbourhood.Moore; ErosionProgressDelegate erosionProgressDelegate = new ErosionProgressDelegate(dummyErosionProgress); erodeAllTerrain(erosionProgressDelegate); }
public void FastHydraulicErosion(int iterations, float maxSlope, float blendAmount) { erosionTypeInt = 1; erosionType = ErosionType.Hydraulic; hydraulicTypeInt = 0; hydraulicType = HydraulicType.Fast; hydraulicIterations = iterations; hydraulicMaxSlope = maxSlope; hydraulicFalloff = blendAmount; neighbourhood = Neighbourhood.Moore; ErosionProgressDelegate erosionProgressDelegate = new ErosionProgressDelegate(dummyErosionProgress); erodeAllTerrain(erosionProgressDelegate); }
// -------------------------------------------------------------------------------------------------------- UTILITIES private void convertIntVarsToEnums() { switch (erosionTypeInt) { case 0: erosionType = ErosionType.Thermal; break; case 1: erosionType = ErosionType.Hydraulic; break; case 2: erosionType = ErosionType.Tidal; break; case 3: erosionType = ErosionType.Wind; break; case 4: erosionType = ErosionType.Glacial; break; } switch (hydraulicTypeInt) { case 0: hydraulicType = HydraulicType.Fast; break; case 1: hydraulicType = HydraulicType.Full; break; case 2: hydraulicType = HydraulicType.Velocity; break; } switch (generatorTypeInt) { case 0: generatorType = GeneratorType.Voronoi; break; case 1: generatorType = GeneratorType.DiamondSquare; break; case 2: generatorType = GeneratorType.Perlin; break; case 3: generatorType = GeneratorType.Smooth; break; case 4: generatorType = GeneratorType.Normalise; break; } switch (voronoiTypeInt) { case 0: voronoiType = VoronoiType.Linear; break; case 1: voronoiType = VoronoiType.Sine; break; case 2: voronoiType = VoronoiType.Tangent; break; } switch (neighbourhoodInt) { case 0: neighbourhood = Neighbourhood.Moore; break; case 1: neighbourhood = Neighbourhood.VonNeumann; break; } }
public void VelocityHydraulicErosion(int iterations, float rainfall, float evaporation, float solubility, float saturation, float velocity, float momentum, float entropy, float downcutting) { erosionTypeInt = 1; erosionType = ErosionType.Hydraulic; hydraulicTypeInt = 2; hydraulicType = HydraulicType.Velocity; hydraulicIterations = iterations; hydraulicVelocityRainfall = rainfall; hydraulicVelocityEvaporation = evaporation; hydraulicVelocitySedimentSolubility = solubility; hydraulicVelocitySedimentSaturation = saturation; hydraulicVelocity = velocity; hydraulicMomentum = momentum; hydraulicEntropy = entropy; hydraulicDowncutting = downcutting; neighbourhood = Neighbourhood.Moore; ErosionProgressDelegate erosionProgressDelegate = new ErosionProgressDelegate(dummyErosionProgress); erodeAllTerrain(erosionProgressDelegate); }