WIP fractal-gavoro-pseudoerosion

This commit is contained in:
Astrash
2024-04-17 09:54:07 +10:00
parent 94949c9120
commit 142d364682
7 changed files with 432 additions and 2 deletions

View File

@@ -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);
}