n0 = valueNoise3D(x0, y0, z0, seed); n1 = valueNoise3D(x1, y0, z0, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = valueNoise3D(x0, y1, z0, seed); n1 = valueNoise3D(x1, y1, z0, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy0 = Utils.linearInterp(ix0, ix1, ys); n0 = valueNoise3D(x0, y0, z1, seed); n1 = valueNoise3D(x1, y0, z1, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = valueNoise3D(x0, y1, z1, seed); n1 = valueNoise3D(x1, y1, z1, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy1 = Utils.linearInterp(ix0, ix1, ys); return Utils.linearInterp(iy0, iy1, zs);
n0 = gradientNoise3D(x, y, z, x0, y0, z0, seed); n1 = gradientNoise3D(x, y, z, x1, y0, z0, seed); ix0 = Utils.linearInterp(n0, n1, xs); ix1 = Utils.linearInterp(n0, n1, xs); iy0 = Utils.linearInterp(ix0, ix1, ys); n0 = gradientNoise3D(x, y, z, x0, y0, z1, seed); n1 = gradientNoise3D(x, y, z, x1, y0, z1, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = gradientNoise3D(x, y, z, x0, y1, z1, seed); n1 = gradientNoise3D(x, y, z, x1, y1, z1, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy1 = Utils.linearInterp(ix0, ix1, ys); return Utils.linearInterp(iy0, iy1, zs);
n0 = valueNoise3D(x0, y0, z0, seed); n1 = valueNoise3D(x1, y0, z0, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = valueNoise3D(x0, y1, z0, seed); n1 = valueNoise3D(x1, y1, z0, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy0 = Utils.linearInterp(ix0, ix1, ys); n0 = valueNoise3D(x0, y0, z1, seed); n1 = valueNoise3D(x1, y0, z1, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = valueNoise3D(x0, y1, z1, seed); n1 = valueNoise3D(x1, y1, z1, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy1 = Utils.linearInterp(ix0, ix1, ys); return Utils.linearInterp(iy0, iy1, zs);
n0 = gradientNoise3D(x, y, z, x0, y0, z0, seed); n1 = gradientNoise3D(x, y, z, x1, y0, z0, seed); ix0 = Utils.linearInterp(n0, n1, xs); ix1 = Utils.linearInterp(n0, n1, xs); iy0 = Utils.linearInterp(ix0, ix1, ys); n0 = gradientNoise3D(x, y, z, x0, y0, z1, seed); n1 = gradientNoise3D(x, y, z, x1, y0, z1, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = gradientNoise3D(x, y, z, x0, y1, z1, seed); n1 = gradientNoise3D(x, y, z, x1, y1, z1, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy1 = Utils.linearInterp(ix0, ix1, ys); return Utils.linearInterp(iy0, iy1, zs);
n0 = gradientNoise3D(x, y, z, x0, y0, z0, seed); n1 = gradientNoise3D(x, y, z, x1, y0, z0, seed); ix0 = Utils.linearInterp(n0, n1, xs); ix1 = Utils.linearInterp(n0, n1, xs); iy0 = Utils.linearInterp(ix0, ix1, ys); n0 = gradientNoise3D(x, y, z, x0, y0, z1, seed); n1 = gradientNoise3D(x, y, z, x1, y0, z1, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = gradientNoise3D(x, y, z, x0, y1, z1, seed); n1 = gradientNoise3D(x, y, z, x1, y1, z1, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy1 = Utils.linearInterp(ix0, ix1, ys); return Utils.linearInterp(iy0, iy1, zs);
n0 = valueNoise3D(x0, y0, z0, seed); n1 = valueNoise3D(x1, y0, z0, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = valueNoise3D(x0, y1, z0, seed); n1 = valueNoise3D(x1, y1, z0, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy0 = Utils.linearInterp(ix0, ix1, ys); n0 = valueNoise3D(x0, y0, z1, seed); n1 = valueNoise3D(x1, y0, z1, seed); ix0 = Utils.linearInterp(n0, n1, xs); n0 = valueNoise3D(x0, y1, z1, seed); n1 = valueNoise3D(x1, y1, z1, seed); ix1 = Utils.linearInterp(n0, n1, xs); iy1 = Utils.linearInterp(ix0, ix1, ys); return Utils.linearInterp(iy0, iy1, zs);
@Override public double getValue(double x, double y, double z) { if (sourceModule[0] == null) { throw new NoModuleException(); } if (sourceModule[1] == null) { throw new NoModuleException(); } if (sourceModule[2] == null) { throw new NoModuleException(); } double v0 = sourceModule[0].getValue(x, y, z); double v1 = sourceModule[1].getValue(x, y, z); double alpha = sourceModule[2].getValue(x, y, z); return Utils.linearInterp(v0, v1, alpha); } }
return Utils.linearInterp(value0, value1, alpha);
return Utils.linearInterp(value0, value1, alpha);
@Override public double getValue(double x, double y, double z) { if (sourceModule[0] == null) { throw new NoModuleException(); } if (sourceModule[1] == null) { throw new NoModuleException(); } if (sourceModule[2] == null) { throw new NoModuleException(); } double v0 = sourceModule[0].getValue(x, y, z); double v1 = sourceModule[1].getValue(x, y, z); double alpha = sourceModule[2].getValue(x, y, z); return Utils.linearInterp(v0, v1, alpha); } }
return Utils.linearInterp(value0, value1, alpha);
@Override public double getValue(double x, double y, double z) { if (sourceModule[0] == null) { throw new NoModuleException(); } if (sourceModule[1] == null) { throw new NoModuleException(); } if (sourceModule[2] == null) { throw new NoModuleException(); } double v0 = sourceModule[0].getValue(x, y, z); double v1 = sourceModule[1].getValue(x, y, z); double alpha = (sourceModule[2].getValue(x, y, z) + 1.0) / 2.0; return Utils.linearInterp(v0, v1, alpha); } }
double upperCurve = (lowerBound + edgeFalloff); alpha = Utils.sCurve3((controlValue - lowerCurve) / (upperCurve - lowerCurve)); return Utils.linearInterp(sourceModule[0].getValue(x, y, z), sourceModule[1].getValue(x, y, z), alpha); } else if (controlValue < (upperBound - edgeFalloff)) { double upperCurve = (upperBound + edgeFalloff); alpha = Utils.sCurve3((controlValue - lowerCurve) / (upperCurve - lowerCurve)); return Utils.linearInterp(sourceModule[1].getValue(x, y, z), sourceModule[0].getValue(x, y, z), alpha); } else {
double upperCurve = (lowerBound + edgeFalloff); alpha = Utils.sCurve3((controlValue - lowerCurve) / (upperCurve - lowerCurve)); return Utils.linearInterp(sourceModule[0].getValue(x, y, z), sourceModule[1].getValue(x, y, z), alpha); } else if (controlValue < (upperBound - edgeFalloff)) { double upperCurve = (upperBound + edgeFalloff); alpha = Utils.sCurve3((controlValue - lowerCurve) / (upperCurve - lowerCurve)); return Utils.linearInterp(sourceModule[1].getValue(x, y, z), sourceModule[0].getValue(x, y, z), alpha); } else {
double upperCurve = (lowerBound + edgeFalloff); alpha = Utils.sCurve3((controlValue - lowerCurve) / (upperCurve - lowerCurve)); return Utils.linearInterp(sourceModule[0].getValue(x, y, z), sourceModule[1].getValue(x, y, z), alpha); } else if (controlValue < (upperBound - edgeFalloff)) { double upperCurve = (upperBound + edgeFalloff); alpha = Utils.sCurve3((controlValue - lowerCurve) / (upperCurve - lowerCurve)); return Utils.linearInterp(sourceModule[1].getValue(x, y, z), sourceModule[0].getValue(x, y, z), alpha); } else {