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