Examples of FractalSum


Examples of com.jme3.terrain.noise.fractal.FractalSum

    int offset = (workSize - origSize) / 2;
    Logger.getLogger(PerturbFilter.class.getCanonicalName()).info(
        "Found origSize : " + origSize + " and offset: " + offset + " for workSize : " + workSize + " and magnitude : "
            + this.magnitude);
    float[] retval = new float[workSize * workSize];
    float[] perturbx = new FractalSum().setOctaves(8).setScale(5f).getBuffer(sx, sy, base, workSize).array();
    float[] perturby = new FractalSum().setOctaves(8).setScale(5f).getBuffer(sx, sy, base + 1, workSize).array();
    for (int y = 0; y < workSize; y++) {
      for (int x = 0; x < workSize; x++) {
        // Perturb our coordinates
        float noisex = perturbx[y * workSize + x];
        float noisey = perturby[y * workSize + x];
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.