Package com.sk89q.worldedit.math.noise

Examples of com.sk89q.worldedit.math.noise.PerlinNoise


            return new PerlinNoise();
        }
    };

    public static double perlin(RValue seed, RValue x, RValue y, RValue z, RValue frequency, RValue octaves, RValue persistence) throws EvaluationException {
        PerlinNoise perlin = localPerlin.get();
        try {
            perlin.setSeed((int) seed.getValue());
            perlin.setFrequency(frequency.getValue());
            perlin.setOctaveCount((int) octaves.getValue());
            perlin.setPersistence(persistence.getValue());
        } catch (IllegalArgumentException e) {
            throw new EvaluationException(0, "Perlin noise error: " + e.getMessage());
        }
        return perlin.noise(new Vector(x.getValue(), y.getValue(), z.getValue()));
    }
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.math.noise.PerlinNoise

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.