From 4c3d19a6c60665bcc13b30f367a70f3a4f3feb3c Mon Sep 17 00:00:00 2001 From: cola98765 Date: Sun, 10 Oct 2021 08:36:45 +0200 Subject: [PATCH] merge all 1 block gaps for better look o trees --- .../com/seibel/lod/util/DataPointUtil.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/seibel/lod/util/DataPointUtil.java b/src/main/java/com/seibel/lod/util/DataPointUtil.java index 53c982794..0fa5d6c92 100644 --- a/src/main/java/com/seibel/lod/util/DataPointUtil.java +++ b/src/main/java/com/seibel/lod/util/DataPointUtil.java @@ -474,8 +474,24 @@ public class DataPointUtil return dataPoint; } + //we cut the 1 block gaps + int j; + for (i = 0; i < count - 1; i++) + { + if (heightAndDepth[i * 2 + 1] - heightAndDepth[(i + 1) * 2] == 1) + { + heightAndDepth[i * 2 + 1] = heightAndDepth[(i + 1) * 2 + 1]; + for (j = i + 1; j < count - 1; j++) + { + heightAndDepth[j * 2] = heightAndDepth[(j + 1) * 2]; + heightAndDepth[j * 2 + 1] = heightAndDepth[(j + 1) * 2 + 1]; + } + count--; + } + } + //we limit the vertical portion to maxVerticalData - int j = 0; + j = 0; while (count > maxVerticalData) { ii = worldHeight;