From e7c4827d0867171ef075d8f83e928990ea29c0db Mon Sep 17 00:00:00 2001 From: Leonardo Date: Mon, 20 Sep 2021 15:49:22 +0200 Subject: [PATCH] Now the single merge use min and max depth and height and no more the mean to make it more consistent with the multi-lod --- src/main/java/com/seibel/lod/util/DataPointUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/seibel/lod/util/DataPointUtil.java b/src/main/java/com/seibel/lod/util/DataPointUtil.java index 13514faa4..9cef56d06 100644 --- a/src/main/java/com/seibel/lod/util/DataPointUtil.java +++ b/src/main/java/com/seibel/lod/util/DataPointUtil.java @@ -224,8 +224,8 @@ public class DataPointUtil int tempRed = 0; int tempGreen = 0; int tempBlue = 0; - int tempHeight = 0; - int tempDepth = 0; + int tempHeight = Integer.MIN_VALUE; + int tempDepth = Integer.MAX_VALUE; int tempLightBlock = 0; int tempLightSky = 0; byte tempGenMode = DistanceGenerationMode.SERVER.complexity; @@ -244,8 +244,8 @@ public class DataPointUtil tempRed += DataPointUtil.getRed(data); tempGreen += DataPointUtil.getGreen(data); tempBlue += DataPointUtil.getBlue(data); - tempHeight += DataPointUtil.getHeight(data); - tempDepth += DataPointUtil.getDepth(data); + tempHeight = Math.max(tempHeight, DataPointUtil.getHeight(data)); + tempDepth = Math.min(tempDepth, DataPointUtil.getDepth(data)); tempLightBlock += DataPointUtil.getLightBlock(data); tempLightSky += DataPointUtil.getLightSky(data); }