/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurveMidpointPreset preset = (e2dCurveMidpointPreset)other; frequencyPerUnit = preset.frequencyPerUnit; roughness = preset.roughness; usePeaks = preset.usePeaks; }
public override void Copy(e2dPreset other) { e2dCurvePerlinPreset e2dCurvePerlinPreset = (e2dCurvePerlinPreset)other; this.octaves = e2dCurvePerlinPreset.octaves; this.frequencyPerUnit = e2dCurvePerlinPreset.frequencyPerUnit; this.persistence = e2dCurvePerlinPreset.persistence; }
public override void Copy(e2dPreset other) { e2dCurveMidpointPreset e2dCurveMidpointPreset = (e2dCurveMidpointPreset)other; this.frequencyPerUnit = e2dCurveMidpointPreset.frequencyPerUnit; this.roughness = e2dCurveMidpointPreset.roughness; this.usePeaks = e2dCurveMidpointPreset.usePeaks; }
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurveWalkPreset preset = (e2dCurveWalkPreset)other; angleChangePerUnit = preset.angleChangePerUnit; frequencyPerUnit = preset.frequencyPerUnit; cohesionPerUnit = preset.cohesionPerUnit; }
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurveMidpointPreset preset = (e2dCurveMidpointPreset)other; frequencyPerUnit = preset.frequencyPerUnit; roughness = preset.roughness; usePeaks = preset.usePeaks; }
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurvePerlinPreset preset = (e2dCurvePerlinPreset)other; octaves = preset.octaves; frequencyPerUnit = preset.frequencyPerUnit; persistence = preset.persistence; }
public override void Copy(e2dPreset other) { e2dCurveVoronoiPreset e2dCurveVoronoiPreset = (e2dCurveVoronoiPreset)other; this.peakType = e2dCurveVoronoiPreset.peakType; this.frequencyPerUnit = e2dCurveVoronoiPreset.frequencyPerUnit; this.peakRatio = e2dCurveVoronoiPreset.peakRatio; this.peakWidth = e2dCurveVoronoiPreset.peakWidth; this.usePeaks = e2dCurveVoronoiPreset.usePeaks; }
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurveVoronoiPreset preset = (e2dCurveVoronoiPreset)other; peakType = preset.peakType; frequencyPerUnit = preset.frequencyPerUnit; peakRatio = preset.peakRatio; peakWidth = preset.peakWidth; usePeaks = preset.usePeaks; }
/// Copies data from another preset. Assumes both presets are of the same kind. public abstract void Copy(e2dPreset other);
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurveWalkPreset preset = (e2dCurveWalkPreset)other; angleChangePerUnit = preset.angleChangePerUnit; frequencyPerUnit = preset.frequencyPerUnit; cohesionPerUnit = preset.cohesionPerUnit; }
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurveVoronoiPreset preset = (e2dCurveVoronoiPreset)other; peakType = preset.peakType; frequencyPerUnit = preset.frequencyPerUnit; peakRatio = preset.peakRatio; peakWidth = preset.peakWidth; usePeaks = preset.usePeaks; }
/// Copies data from another preset. Assumes both presets are of the same kind. public override void Copy(e2dPreset other) { e2dCurvePerlinPreset preset = (e2dCurvePerlinPreset)other; octaves = preset.octaves; frequencyPerUnit = preset.frequencyPerUnit; persistence = preset.persistence; }
public abstract void Copy(e2dPreset other);
/// Returns the array of presets of the specified generator method. public static e2dPreset[] GetCurvePresets(e2dGeneratorCurveMethod method) { if (sCurvePresets == null) { sCurvePresets = new e2dPreset[(int)e2dGeneratorCurveMethod.NUM_METHODS][]; sCurvePresets[(int)e2dGeneratorCurveMethod.PERLIN] = new e2dPreset[] { new e2dCurvePerlinPreset() { name = "Rolling Hills", octaves = 3, frequencyPerUnit = 0.02f, persistence = 0.3f }, new e2dCurvePerlinPreset() { name = "Jagged Plains", octaves = 11, frequencyPerUnit = 0.001f, persistence = 0.51f }, new e2dCurvePerlinPreset() { name = "Spiky Mountains", octaves = 2, frequencyPerUnit = 0.117f, persistence = 0.155f }, }; sCurvePresets[(int)e2dGeneratorCurveMethod.VORONOI] = new e2dPreset[] { new e2dCurveVoronoiPreset() { name = "Rolling Hills", frequencyPerUnit = 0.025f, peakRatio = 0.755f, peakWidth = 0.210f, peakType = e2dVoronoiPeakType.SINE }, new e2dCurveVoronoiPreset() { name = "Highland Plateaus", frequencyPerUnit = 0.012f, peakRatio = 0.664f, peakWidth = 0.210f, peakType = e2dVoronoiPeakType.QUADRATIC }, new e2dCurveVoronoiPreset() { name = "Scattered Mountains", frequencyPerUnit = 0.037f, peakRatio = 0.237f, peakWidth = 0.210f, peakType = e2dVoronoiPeakType.SINE }, }; sCurvePresets[(int)e2dGeneratorCurveMethod.MIDPOINT] = new e2dPreset[] { new e2dCurveMidpointPreset() { name = "Spiky Hills", frequencyPerUnit = 0.025f, roughness = 0.082f }, new e2dCurveMidpointPreset() { name = "Jagged Plains", frequencyPerUnit = 0.001f, roughness = 0.709f }, new e2dCurveMidpointPreset() { name = "Jagged Mountains", frequencyPerUnit = 0.084f, roughness = 0.327f }, }; sCurvePresets[(int)e2dGeneratorCurveMethod.WALK] = new e2dPreset[] { new e2dCurveWalkPreset() { name = "Rolling Hills", frequencyPerUnit = 0.5f, angleChangePerUnit = 56, cohesionPerUnit = 0.855f }, new e2dCurveWalkPreset() { name = "Large Plains", frequencyPerUnit = 0.269f, angleChangePerUnit = 39, cohesionPerUnit = 2 }, }; } return(sCurvePresets[(int)method]); }