Don't crazily initialise HeightMapFilter...??

Dieser Commit ist enthalten in:
dordsor21 2022-02-16 17:47:43 +00:00
Ursprung 3e85369765
Commit 05bd84b504
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -56,14 +56,9 @@ public interface HeightMap {
layers
);
if (smooth) {
try {
HeightMapFilter filter = (HeightMapFilter) HeightMapFilter.class.getConstructors()[0].newInstance(GaussianKernel.class
.getConstructors()[0].newInstance(5, 1));
int diameter = 2 * size + 1;
data[1] = filter.filter(data[1], diameter, diameter);
} catch (IllegalAccessException | InvocationTargetException | InstantiationException e) {
e.printStackTrace();
}
HeightMapFilter filter = new HeightMapFilter(new GaussianKernel(5, 1));
int diameter = 2 * size + 1;
data[1] = filter.filter(data[1], diameter, diameter);
}
if (layers) {
heightMap.applyLayers(data[1]);