WIP fractal-gavoro-pseudoerosion

This commit is contained in:
Astrash committed 2024-04-19 20:55:14 +10:00
1 parent 94949c9120
commit 142d364682
7 files changed
+432 -2

No files matched your search

@@ -0,0 +1,22 @@
package com.dfsek.terra.api.noise;
/**
* A NoiseSampler which additionally provides directional derivatives
*/
public interface DerivativeNoiseSampler extends NoiseSampler {
static boolean providesDerivative(NoiseSampler sampler) {
if (sampler instanceof DerivativeNoiseSampler dSampler) {
return dSampler.isDerivable();
}
return false;
}
default boolean isDerivable() {
return false;
}
double[] noised(long seed, double x, double y);
double[] noised(long seed, double x, double y, double z);
}