mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +00:00
Make FractalNoiseFunction impls support derivatives
This commit is contained in:
parent
b7326c0ff6
commit
158ffba2a5
@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
package com.dfsek.terra.addons.noise.samplers.noise.fractal;
|
package com.dfsek.terra.addons.noise.samplers.noise.fractal;
|
||||||
|
|
||||||
import com.dfsek.terra.addons.noise.samplers.noise.NoiseFunction;
|
import com.dfsek.terra.addons.noise.samplers.noise.DerivativeNoiseFunction;
|
||||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||||
|
|
||||||
|
|
||||||
public abstract class FractalNoiseFunction extends NoiseFunction {
|
public abstract class FractalNoiseFunction extends DerivativeNoiseFunction {
|
||||||
protected final NoiseSampler input;
|
protected final NoiseSampler input;
|
||||||
protected double fractalBounding = 1 / 1.75;
|
protected double fractalBounding = 1 / 1.75;
|
||||||
protected int octaves = 3;
|
protected int octaves = 3;
|
||||||
@ -52,4 +52,19 @@ public abstract class FractalNoiseFunction extends NoiseFunction {
|
|||||||
public void setWeightedStrength(double weightedStrength) {
|
public void setWeightedStrength(double weightedStrength) {
|
||||||
this.weightedStrength = weightedStrength;
|
this.weightedStrength = weightedStrength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDifferentiable() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double[] getNoiseDerivativeRaw(long seed, double x, double y) {
|
||||||
|
throw new UnsupportedOperationException("Implementation failed to check or set isDifferentiable correctly");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double[] getNoiseDerivativeRaw(long seed, double x, double y, double z) {
|
||||||
|
throw new UnsupportedOperationException("Implementation failed to check or set isDifferentiable correctly");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user