Esempio n. 1
0
 public void VerifyVallidity(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     if (!IsValid(intermidiate))
     {
         throw new InvalidOperationException("Builder is in an invalid satate and thus cannot build an instance.");
     }
 }
Esempio n. 2
0
 //TODO
 public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new HydrolicErosion(
                offset: Offset,
                threadPool: intermidiate.ThreadPool,
                source: intermidiate.Get <float>(SourceID),
                brushRadius: BrushRadius,
                depositSpeed: DepositSpeed,
                erodeSpeed: ErodeSpeed,
                evaporationSpeed: EvaporationSpeed,
                gravity: Gravity,
                initialSpeed: InitialSpeed,
                initialVolume: InitialVolume,
                layeringPower: LayeringPower,
                maxIterations: MaxIterations,
                minSedimentCapacity: MinSedimentCapacity,
                outputFactor: OutputFactor,
                sedimentCapacityFactor: SedimentCapacityFactor,
                stepLength: StepLength,
                friction: Friction,
                minModification: MinModification,
                maxSectorSize: MaxSectorSize,
                coverageFactor: CoverageFactor,
                maxModification: MaxModification,
                sedimentFactor: SedimentFactor
                ));
 }
Esempio n. 3
0
        public Dictionary <string, IAlgorithm> BuildGeneric(LandscapeBuilder.LandscapeIntermidiate intermidiate)
        {
            Dictionary <string, IAlgorithm> ret = new Dictionary <string, IAlgorithm> {
                { LandscapeBuilder.MAIN_ALGORITHM_KEY, Build(intermidiate) }
            };

            return(ret);
        }
Esempio n. 4
0
 public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     if (Force == 1)
     {
         return(new BlurBasic(Offset, intermidiate.ThreadPool, intermidiate.Get <float>(SourceID)));
     }
     return(new BlurAdvanced(Offset, intermidiate.ThreadPool, intermidiate.Get <float>(SourceID), Force));
 }
        public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
        {
            VerifyVallidity(intermidiate);
            List <Algorithm <float> > algorithms = new List <Algorithm <float> >();

            foreach (string sourceID in Sources)
            {
                algorithms.Add(intermidiate.Get <float>(sourceID));
            }
            return(new FloatAdder(Offset, intermidiate.ThreadPool, algorithms, DeltaFactor, RetFactor));
        }
Esempio n. 6
0
 public abstract Dictionary <string, IAlgorithm> BuildGeneric(LandscapeBuilder.LandscapeIntermidiate landscapeIntermidiate);
Esempio n. 7
0
        public Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
        {
            string key = intermidiate.GetKeyFor(this);

            return(intermidiate.Get <float>(key));
        }
Esempio n. 8
0
 public override Algorithm <T> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new Memory <T>(Offset, intermidiate.ThreadPool, intermidiate.Get <T>(SourceID)));
 }
Esempio n. 9
0
 public override Algorithm <Vec3> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new Downhill(Offset, intermidiate.ThreadPool, intermidiate.Get <Vec3>(SourceID)));
 }
Esempio n. 10
0
 public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new CoverterUintToFloat(Offset, intermidiate.ThreadPool, intermidiate.Get <uint>(SourceID)));
 }
Esempio n. 11
0
 //TODO
 public override Algorithm <Vec3> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new NormalFast(Offset, intermidiate.ThreadPool, intermidiate.Get <float>(SourceID), gridStepOverHeightRange: GridStepOverHeightRange));
 }
Esempio n. 12
0
 public abstract Outputter <O> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate);
Esempio n. 13
0
 public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new PerlinNoise(Offset, intermidiate.ThreadPool, intermidiate.Get <Vec2>(SourceID), Scale));
 }
Esempio n. 14
0
 public override Algorithm <Vec2> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new Vec2Field(Offset, intermidiate.ThreadPool, intermidiate.Get <uint>(SourceID), Magnitude));
 }
Esempio n. 15
0
 public override Algorithm <uint> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate)
 {
     VerifyVallidity(intermidiate);
     return(new Random(Offset, intermidiate.ThreadPool, Seed));
 }
Esempio n. 16
0
 public abstract Algorithm <T> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate);