コード例 #1
0
 /// 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;
 }
コード例 #2
0
    public override void Copy(e2dPreset other)
    {
        e2dCurvePerlinPreset e2dCurvePerlinPreset = (e2dCurvePerlinPreset)other;

        this.octaves          = e2dCurvePerlinPreset.octaves;
        this.frequencyPerUnit = e2dCurvePerlinPreset.frequencyPerUnit;
        this.persistence      = e2dCurvePerlinPreset.persistence;
    }
コード例 #3
0
    public override void Copy(e2dPreset other)
    {
        e2dCurveMidpointPreset e2dCurveMidpointPreset = (e2dCurveMidpointPreset)other;

        this.frequencyPerUnit = e2dCurveMidpointPreset.frequencyPerUnit;
        this.roughness        = e2dCurveMidpointPreset.roughness;
        this.usePeaks         = e2dCurveMidpointPreset.usePeaks;
    }
コード例 #4
0
    /// 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;
    }
コード例 #5
0
    /// 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;
    }
コード例 #6
0
    /// 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;
    }
コード例 #7
0
    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;
    }
コード例 #8
0
    /// 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;
    }
コード例 #9
0
 /// Copies data from another preset. Assumes both presets are of the same kind.
 public abstract void Copy(e2dPreset other);
コード例 #10
0
 /// 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;
 }
コード例 #11
0
 /// 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;
 }
コード例 #12
0
 /// 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;
 }
コード例 #13
0
 public abstract void Copy(e2dPreset other);
コード例 #14
0
    /// 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]);
    }