public void VerifyVallidity(LandscapeBuilder.LandscapeIntermidiate intermidiate) { if (!IsValid(intermidiate)) { throw new InvalidOperationException("Builder is in an invalid satate and thus cannot build an instance."); } }
//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 )); }
public Dictionary <string, IAlgorithm> BuildGeneric(LandscapeBuilder.LandscapeIntermidiate intermidiate) { Dictionary <string, IAlgorithm> ret = new Dictionary <string, IAlgorithm> { { LandscapeBuilder.MAIN_ALGORITHM_KEY, Build(intermidiate) } }; return(ret); }
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)); }
public abstract Dictionary <string, IAlgorithm> BuildGeneric(LandscapeBuilder.LandscapeIntermidiate landscapeIntermidiate);
public Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { string key = intermidiate.GetKeyFor(this); return(intermidiate.Get <float>(key)); }
public override Algorithm <T> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new Memory <T>(Offset, intermidiate.ThreadPool, intermidiate.Get <T>(SourceID))); }
public override Algorithm <Vec3> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new Downhill(Offset, intermidiate.ThreadPool, intermidiate.Get <Vec3>(SourceID))); }
public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new CoverterUintToFloat(Offset, intermidiate.ThreadPool, intermidiate.Get <uint>(SourceID))); }
//TODO public override Algorithm <Vec3> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new NormalFast(Offset, intermidiate.ThreadPool, intermidiate.Get <float>(SourceID), gridStepOverHeightRange: GridStepOverHeightRange)); }
public abstract Outputter <O> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate);
public override Algorithm <float> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new PerlinNoise(Offset, intermidiate.ThreadPool, intermidiate.Get <Vec2>(SourceID), Scale)); }
public override Algorithm <Vec2> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new Vec2Field(Offset, intermidiate.ThreadPool, intermidiate.Get <uint>(SourceID), Magnitude)); }
public override Algorithm <uint> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate) { VerifyVallidity(intermidiate); return(new Random(Offset, intermidiate.ThreadPool, Seed)); }
public abstract Algorithm <T> Build(LandscapeBuilder.LandscapeIntermidiate intermidiate);