Examples of noise()


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

            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()));
    }

    private static final ThreadLocal<VoronoiNoise> localVoronoi = new ThreadLocal<VoronoiNoise>() {
        @Override
        protected VoronoiNoise initialValue() {
View Full Code Here

Examples of com.sk89q.worldedit.math.noise.RidgedMultiFractalNoise.noise()

            ridgedMulti.setFrequency(frequency.getValue());
            ridgedMulti.setOctaveCount((int) octaves.getValue());
        } catch (IllegalArgumentException e) {
            throw new EvaluationException(0, "Ridged multi error: " + e.getMessage());
        }
        return ridgedMulti.noise(new Vector(x.getValue(), y.getValue(), z.getValue()));
    }

    private static double queryInternal(RValue type, RValue data, double typeId, double dataValue) throws EvaluationException {
        // Compare to input values and determine return value
        final double ret = (typeId == type.getValue() && dataValue == data.getValue()) ? 1.0 : 0.0;
View Full Code Here

Examples of com.sk89q.worldedit.math.noise.VoronoiNoise.noise()

            voronoi.setSeed((int) seed.getValue());
            voronoi.setFrequency(frequency.getValue());
        } catch (IllegalArgumentException e) {
            throw new EvaluationException(0, "Voronoi error: " + e.getMessage());
        }
        return voronoi.noise(new Vector(x.getValue(), y.getValue(), z.getValue()));
    }

    private static final ThreadLocal<RidgedMultiFractalNoise> localRidgedMulti = new ThreadLocal<RidgedMultiFractalNoise>() {
        @Override
        protected RidgedMultiFractalNoise initialValue() {
View Full Code Here

Examples of org.bukkit.util.noise.OctaveGenerator.noise()

                for (int y = (int) Math.min(baseHeight
                        + noiseHeight.noise(x + chunkX, z + chunkZ, 0.7, 0.6, true)
                        * terrainHeight
                        + noiseJitter.noise(x + chunkX, z + chunkZ, 0.5, 0.5)
                        * 1.5, WORLD_DEPTH - 1); y > 0; y--) {
                    double terrainType = noiseType.noise(x + chunkX, y, z + chunkZ, 0.5, 0.5);
                    Material ground = matTop;
                    if (Math.abs(terrainType) < random.nextDouble() / 3 && !noDirt) {
                        ground = matMain;
                    } else if (deep != 0 || y < waterLevel) {
                        ground = matMain;
View Full Code Here

Examples of org.bukkit.util.noise.OctaveGenerator.noise()

                }
                while (platform-- > 0) {
                    set(buf, x, height / 2 - platform - 1, z, stone);
                }

                platform = (int) (noisePlatform2.noise(x + chunkX, z + chunkZ, 0.5, 0.5, true) * 30 - 6);
                if (platform > 5) {
                    platform -= random.nextInt(3);
                }
                while (platform-- > 0) {
                    set(buf, x, height / 4 - platform - 1, z, stone);
View Full Code Here

Examples of org.bukkit.util.noise.SimplexNoiseGenerator.noise()

                }
            }
        }

        // Go go dungeons
        double density = noise.noise(source.getX(), source.getZ());
        if (density > 0.8) {
            int roomCount = (int) (density * 10) - 3;

            for (int i = 0; i < roomCount; i++) {
                if (random.nextBoolean()) {
View Full Code Here

Examples of org.terasology.utilities.procedural.PerlinNoise.noise()

        for (int i = 0; i < warmUp; i++) {
            float posX = pfr.nextFloat() * 1000f;
            float posY = pfr.nextFloat() * 1000f;
            float posZ = pfr.nextFloat() * 1000f;

            pn.noise(posX, posY, posZ);
        }

        for (int i = 0; i < warmUp; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
 
View Full Code Here

Examples of org.terasology.utilities.procedural.PerlinNoise.noise()

        for (int i = 0; i < count; i++) {
            float posX = pfr.nextFloat() * 1000f;
            float posY = pfr.nextFloat() * 1000f;
            float posZ = pfr.nextFloat() * 1000f;

            pn.noise(posX, posY, posZ);
        }

        logger.info("Perlin Noise : " + (System.nanoTime() - start) / 1000000 + "ms.");

        start = System.nanoTime();
View Full Code Here

Examples of org.terasology.utilities.procedural.SimplexNoise.noise()

        for (int i = 0; i < warmUp; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }

        long start = System.nanoTime();

        for (int i = 0; i < count; i++) {
View Full Code Here

Examples of org.terasology.utilities.procedural.SimplexNoise.noise()

        for (int i = 0; i < count; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }

        logger.info("Simplex Noise : " + (System.nanoTime() - start) / 1000000 + "ms.");

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.