예제 #1
0
 public void setVoronoiPreset(TerrainToolkit.voronoiPresetData preset)
 {
     this.generatorTypeInt = 0;
     this.generatorType = TerrainToolkit.GeneratorType.Voronoi;
     this.voronoiTypeInt = (int)preset.voronoiType;
     this.voronoiType = preset.voronoiType;
     this.voronoiCells = preset.voronoiCells;
     this.voronoiFeatures = preset.voronoiFeatures;
     this.voronoiScale = preset.voronoiScale;
     this.voronoiBlend = preset.voronoiBlend;
 }
예제 #2
0
 public void SmoothTerrain(int iterations, float blend)
 {
     this.generatorTypeInt = 3;
     this.generatorType = TerrainToolkit.GeneratorType.Smooth;
     this.smoothIterations = iterations;
     this.smoothBlend = blend;
     this.generateTerrain(new TerrainToolkit.GeneratorProgressDelegate(this.dummyGeneratorProgress));
 }
예제 #3
0
 public void setFractalPreset(TerrainToolkit.fractalPresetData preset)
 {
     this.generatorTypeInt = 1;
     this.generatorType = TerrainToolkit.GeneratorType.DiamondSquare;
     this.diamondSquareDelta = preset.diamondSquareDelta;
     this.diamondSquareBlend = preset.diamondSquareBlend;
 }
예제 #4
0
 public void setPerlinPreset(TerrainToolkit.perlinPresetData preset)
 {
     this.generatorTypeInt = 2;
     this.generatorType = TerrainToolkit.GeneratorType.Perlin;
     this.perlinFrequency = preset.perlinFrequency;
     this.perlinAmplitude = preset.perlinAmplitude;
     this.perlinOctaves = preset.perlinOctaves;
     this.perlinBlend = preset.perlinBlend;
 }
예제 #5
0
 public void PerlinGenerator(int frequency, float amplitude, int octaves, float blend)
 {
     this.generatorTypeInt = 2;
     this.generatorType = TerrainToolkit.GeneratorType.Perlin;
     this.perlinFrequency = frequency;
     this.perlinAmplitude = amplitude;
     this.perlinOctaves = octaves;
     this.perlinBlend = blend;
     this.generateTerrain(new TerrainToolkit.GeneratorProgressDelegate(this.dummyGeneratorProgress));
 }
예제 #6
0
 public void NormaliseTerrain(float minHeight, float maxHeight, float blend)
 {
     this.generatorTypeInt = 4;
     this.generatorType = TerrainToolkit.GeneratorType.Normalise;
     this.normaliseMin = minHeight;
     this.normaliseMax = maxHeight;
     this.normaliseBlend = blend;
     this.generateTerrain(new TerrainToolkit.GeneratorProgressDelegate(this.dummyGeneratorProgress));
 }
예제 #7
0
 public void FractalGenerator(float fractalDelta, float blend)
 {
     this.generatorTypeInt = 1;
     this.generatorType = TerrainToolkit.GeneratorType.DiamondSquare;
     this.diamondSquareDelta = fractalDelta;
     this.diamondSquareBlend = blend;
     this.generateTerrain(new TerrainToolkit.GeneratorProgressDelegate(this.dummyGeneratorProgress));
 }
예제 #8
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;
     }
 }
예제 #9
0
 public void VoronoiGenerator(TerrainToolkit.FeatureType featureType, int cells, float features, float scale, float blend)
 {
     this.generatorTypeInt = 0;
     this.generatorType = TerrainToolkit.GeneratorType.Voronoi;
     switch (featureType)
     {
         case TerrainToolkit.FeatureType.Mountains:
         {
             this.voronoiTypeInt = 0;
             this.voronoiType = TerrainToolkit.VoronoiType.Linear;
             break;
         }
         case TerrainToolkit.FeatureType.Hills:
         {
             this.voronoiTypeInt = 1;
             this.voronoiType = TerrainToolkit.VoronoiType.Sine;
             break;
         }
         case TerrainToolkit.FeatureType.Plateaus:
         {
             this.voronoiTypeInt = 2;
             this.voronoiType = TerrainToolkit.VoronoiType.Tangent;
             break;
         }
     }
     this.voronoiCells = cells;
     this.voronoiFeatures = features;
     this.voronoiScale = scale;
     this.voronoiBlend = blend;
     this.generateTerrain(new TerrainToolkit.GeneratorProgressDelegate(this.dummyGeneratorProgress));
 }