public HydrolicErosion(Coordinate offset, ITGThreadPool threadPool, Algorithm <float> source, float brushRadius, float depositSpeed, float erodeSpeed, float evaporationSpeed, float gravity, float initialSpeed, float initialVolume, int layeringPower, int maxIterations, float minSedimentCapacity, float outputFactor, float sedimentCapacityFactor, float stepLength, float friction, float minModification, int maxSectorSize, float coverageFactor, float maxModification, float sedimentFactor) : base(offset, threadPool, source)
        {
            this.brushRadius            = brushRadius;
            this.depositSpeed           = depositSpeed;
            this.erodeSpeed             = -erodeSpeed;
            volumeStepFactor            = 1f - evaporationSpeed;
            speedStepFactor             = 1f - friction;
            this.gravity                = gravity;
            this.initialSpeed           = initialSpeed;
            this.initialVolume          = initialVolume;
            this.maxIterations          = maxIterations;
            this.minSedimentCapacity    = minSedimentCapacity;
            this.outputFactor           = outputFactor;
            this.sedimentCapacityFactor = sedimentCapacityFactor;
            this.stepLength             = stepLength;
            this.minModification        = minModification;
            this.maxSectorSize          = maxSectorSize;
            this.maxModification        = maxModification;
            this.sedimentFactor         = sedimentFactor;

            errosionBrushes           = new CircularFloatBrushGroup(brushRadius, CircularBrushMode.Quadratic_EaseOut, Constants.AROUND_0_POSITIVE, BRUSHGROUP_SIZE);
            depositBrushes            = new CircularFloatBrushGroup(brushRadius, CircularBrushMode.Quadratic_Smooth, Constants.AROUND_0_POSITIVE, BRUSHGROUP_SIZE);
            layeringEnumeratorBuilder = new LayerungEnumeratorBuilder(layeringPower, coverageFactor);

            extraDropletRadius   = (int)((brushRadius + stepLength * maxIterations) / (Constants.CHUNK_SIZE));
            extraHeightmapRadius = 1 + (int)(extraDropletRadius * 1.125f);
        }
Beispiel #2
0
 public HeightMapImageOutputter(Coordinate offset, ITGThreadPool threadPool, Algorithm <float> source, int size, float min, float max, int layers, bool borders, bool colored) : base(offset, threadPool, source)
 {
     this.size    = size;
     this.layers  = layers;
     this.min     = min;
     factor       = 1f / (max - min);
     this.borders = borders;
     this.colored = colored;
 }
Beispiel #3
0
        public FloatAdder(Coordinate offset, ITGThreadPool threadPool, List <Algorithm <float> > sources, float deltaFactor, float retFactor) : base(offset, threadPool, sources)
        {
            this.deltaFactor = deltaFactor;
            this.retFactor   = retFactor;

            float theoreticalMax = 0f;
            float factor         = 1.0f;

            for (int sIndex = 0; sIndex < this.sources.Length; sIndex++)
            {
                theoreticalMax += factor;
                factor         *= deltaFactor;
            }
            correctionFactor = retFactor / theoreticalMax;
        }
 public InterpolatableAlgorithm(Coordinate offset, ITGThreadPool threadPool, Algorithm <S> source, int scale) : base(offset, threadPool, source)
 {
     this.scale    = scale;
     step          = 1f / scale;
     initialOffset = step / 2;
 }
Beispiel #5
0
 public BlurAdvanced(Coordinate offset, ITGThreadPool threadPool, Algorithm <float> source, float force) : base(offset, threadPool, source)
 {
     oneMinusForce      = 1 - force;
     forceOverFactorSum = force / factorSum;
 }
Beispiel #6
0
 public BlurBasic(Coordinate offset, ITGThreadPool threadPool, Algorithm <float> source) : base(offset, threadPool, source)
 {
 }
Beispiel #7
0
 public Outputter(Coordinate offset, ITGThreadPool threadPool)
 {
     this.threadPool = threadPool;
     this.offset     = offset;
 }
Beispiel #8
0
 public NeighbourBasedLoopingAgorithm(Coordinate offset, ITGThreadPool threadPool, Algorithm <T> source, int repeats) : base(offset, threadPool, source)
 {
     this.repeats = repeats;
 }
 public CoverterUintToFloat(Coordinate offset, ITGThreadPool threadPool, Algorithm <uint> source) : base(offset, threadPool, source)
 {
 }
Beispiel #10
0
 public Vec2Field(Coordinate offset, ITGThreadPool threadPool, Algorithm <uint> algorithm, float magnitude) : base(offset, threadPool, algorithm)
 {
     this.magnitude = magnitude;
 }
 public ThreadingForkSector(ITGThreadPool pool, in RequstSector[] requstSectors, SectorJob <T> .Process SectorPopulation)
Beispiel #12
0
 public PerlinNoise(Coordinate offset, ITGThreadPool threadPool, Algorithm <Vec2> algorithm, int scale) : base(offset, threadPool, algorithm, scale)
 {
 }
 public NeighbourBasedAgorithm(Coordinate offset, ITGThreadPool threadPool, Algorithm <S> source) : base(offset, threadPool, source)
 {
 }
Beispiel #14
0
 public Interpolator(Coordinate offset, ITGThreadPool threadPool, Algorithm <float> algorithm, int scale) : base(offset, threadPool, algorithm, scale)
 {
 }
Beispiel #15
0
 public Memory(Coordinate offset, ITGThreadPool threadPool, Algorithm <T> source) : base(offset, threadPool, source)
 {
     memory = new ConcurrentDictionary <Coordinate, Chunk <T> >();
 }
Beispiel #16
0
 public Downhill(Coordinate offset, ITGThreadPool threadPool, Algorithm <Vec3> source) : base(offset, threadPool, source)
 {
 }
Beispiel #17
0
 public NormalFast(Coordinate offset, ITGThreadPool threadPool, Algorithm <float> algorithm, float gridStepOverHeightRange) : base(offset, threadPool, algorithm)
 {
     this.gridStepOverHeightRange = gridStepOverHeightRange;
 }
Beispiel #18
0
 public Random(Coordinate offset, ITGThreadPool threadPool, int seed = 0) : base(offset, threadPool)
 {
     this.seed = seed;
 }
Beispiel #19
0
 public Outputter(Coordinate offset, ITGThreadPool threadPool, Algorithm <S> source) : base(offset, threadPool)
 {
     this.source = source;
 }
 public MemoryStrictSectoring(Coordinate offset, ITGThreadPool threadPool, Algorithm <T> algorithm, int sectorSize) : base(offset, threadPool, algorithm)
 {
     this.sectorSize = sectorSize;
     memory          = new ConcurrentDictionary <Coordinate, SectorPlaceholder>();
 }
Beispiel #21
0
 public MultiInputAlgorithm(Coordinate offset, ITGThreadPool threadPool, List <Algorithm <S> > sources) : base(offset, threadPool)
 {
     this.sources = sources.ToArray();
 }