From a8bee5215935e82740a6bd879f0e20870056342e Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 20 Jan 2024 09:37:43 -0600 Subject: [PATCH] remove unused code --- .../WorldCurvatureConfigEventHandler.java | 4 -- .../sources/CompleteFullDataSource.java | 48 ------------------- 2 files changed, 52 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/WorldCurvatureConfigEventHandler.java b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/WorldCurvatureConfigEventHandler.java index a8c75134a..35d1517c7 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/WorldCurvatureConfigEventHandler.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/eventHandlers/WorldCurvatureConfigEventHandler.java @@ -19,10 +19,6 @@ package com.seibel.distanthorizons.core.config.eventHandlers; -import com.seibel.distanthorizons.api.DhApi; -import com.seibel.distanthorizons.api.enums.config.ELodShading; -import com.seibel.distanthorizons.api.enums.config.EMaxHorizontalResolution; -import com.seibel.distanthorizons.api.enums.config.EVerticalQuality; import com.seibel.distanthorizons.core.config.Config; import com.seibel.distanthorizons.core.config.listeners.IConfigListener; diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java index 1e1a43022..c0edc5612 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java @@ -444,52 +444,4 @@ public class CompleteFullDataSource extends FullDataArrayAccessor implements IFu @Override public int getWidthInDataPoints() { return this.width; } - - - //========// - // unused // - //========// - - public void updateFromLowerCompleteSource(CompleteFullDataSource subData) - { - LodUtil.assertTrue(this.sectionPos.overlapsExactly(subData.sectionPos)); - LodUtil.assertTrue(subData.sectionPos.getDetailLevel() < this.sectionPos.getDetailLevel()); - if (!firstDataPosCanAffectSecond(this.sectionPos, subData.sectionPos)) - { - return; - } - - DhSectionPos lowerSectPos = subData.sectionPos; - byte detailDiff = (byte) (this.sectionPos.getDetailLevel() - subData.sectionPos.getDetailLevel()); - byte targetDataDetail = this.getDataDetailLevel(); - DhLodPos minDataPos = this.sectionPos.getMinCornerLodPos(targetDataDetail); - if (detailDiff <= SECTION_SIZE_OFFSET) - { - int count = 1 << detailDiff; - int dataPerCount = WIDTH / count; - DhLodPos subDataPos = lowerSectPos.getSectionBBoxPos().getCornerLodPos(targetDataDetail); - int dataOffsetX = subDataPos.x - minDataPos.x; - int dataOffsetZ = subDataPos.z - minDataPos.z; - LodUtil.assertTrue(dataOffsetX >= 0 && dataOffsetX < WIDTH && dataOffsetZ >= 0 && dataOffsetZ < WIDTH); - - for (int xOffset = 0; xOffset < count; xOffset++) - { - for (int zOffset = 0; zOffset < count; zOffset++) - { - SingleColumnFullDataAccessor column = this.get(xOffset + dataOffsetX, zOffset + dataOffsetZ); - column.downsampleFrom(subData.subView(dataPerCount, xOffset * dataPerCount, zOffset * dataPerCount)); - } - } - } - else - { - // Count == 1 - DhLodPos subDataPos = lowerSectPos.getSectionBBoxPos().convertToDetailLevel(targetDataDetail); - int dataOffsetX = subDataPos.x - minDataPos.x; - int dataOffsetZ = subDataPos.z - minDataPos.z; - LodUtil.assertTrue(dataOffsetX >= 0 && dataOffsetX < WIDTH && dataOffsetZ >= 0 && dataOffsetZ < WIDTH); - subData.get(0, 0).deepCopyTo(get(dataOffsetX, dataOffsetZ)); - } - } - }