Examples of NoiseFunction

@author Portet to jme3 by user starcom "Paul Kashofer Austria" @see ImageGraphics

Examples of com.jme3.scene.plugins.blender.textures.generating.NoiseGenerator.NoiseFunction

     * @param nbas1
     * @param nbas2
     * @return
     */
    private float musgraveVariableLunacrityNoise(float x, float y, float z, float distortion, int nbas1, int nbas2) {
        NoiseFunction abstractNoiseFunc1 = NoiseGenerator.noiseFunctions.get(Integer.valueOf(nbas1));
        if (abstractNoiseFunc1 == null) {
            abstractNoiseFunc1 = NoiseGenerator.noiseFunctions.get(Integer.valueOf(0));
        }
        NoiseFunction abstractNoiseFunc2 = NoiseGenerator.noiseFunctions.get(Integer.valueOf(nbas2));
        if (abstractNoiseFunc2 == null) {
            abstractNoiseFunc2 = NoiseGenerator.noiseFunctions.get(Integer.valueOf(0));
        }
        // get a random vector and scale the randomization
        float rx = abstractNoiseFunc1.execute(x + 13.5f, y + 13.5f, z + 13.5f) * distortion;
        float ry = abstractNoiseFunc1.execute(x, y, z) * distortion;
        float rz = abstractNoiseFunc1.execute(x - 13.5f, y - 13.5f, z - 13.5f) * distortion;
        return abstractNoiseFunc2.executeSigned(x + rx, y + ry, z + rz); // distorted-domain noise
    }
View Full Code Here

Examples of com.jme3.scene.plugins.blender.textures.generating.NoiseGenerator.NoiseFunction

            octaves = ((Number) tex.getFieldValue("mg_octaves")).floatValue();
            offset = ((Number) tex.getFieldValue("mg_offset")).floatValue();
            gain = ((Number) tex.getFieldValue("mg_gain")).floatValue();

            int noisebasis = ((Number) tex.getFieldValue("noisebasis")).intValue();
            NoiseFunction noiseFunction = NoiseGenerator.noiseFunctions.get(noisebasis);
            if (noiseFunction == null) {
                noiseFunction = NoiseGenerator.noiseFunctions.get(0);
                noisebasis = 0;
            }
            this.noisebasis = noisebasis;
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.