From f8e3665e1403ec11fa5dc66ad71199941116a7b6 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 18 Feb 2023 12:36:54 -0600 Subject: [PATCH] Remove unused methods from ColumnFormat --- .../column/accessor/ColumnFormat.java | 62 +------------------ 1 file changed, 2 insertions(+), 60 deletions(-) diff --git a/core/src/main/java/com/seibel/lod/core/datatype/column/accessor/ColumnFormat.java b/core/src/main/java/com/seibel/lod/core/datatype/column/accessor/ColumnFormat.java index 712347cb2..07d6f7c49 100644 --- a/core/src/main/java/com/seibel/lod/core/datatype/column/accessor/ColumnFormat.java +++ b/core/src/main/java/com/seibel/lod/core/datatype/column/accessor/ColumnFormat.java @@ -106,7 +106,7 @@ public class ColumnFormat return (generationMode & GEN_TYPE_MASK) << GEN_TYPE_SHIFT; } - + public static long createDataPoint(int height, int depth, int color, int lightSky, int lightBlock, int generationMode) { return createDataPoint( @@ -158,7 +158,7 @@ public class ColumnFormat | (generationMode & GEN_TYPE_MASK) << GEN_TYPE_SHIFT ; } - + public static long shiftHeightAndDepth(long dataPoint, short offset) { long height = (dataPoint + ((long) offset << HEIGHT_SHIFT)) & HEIGHT_SHIFTED_MASK; @@ -167,42 +167,6 @@ public class ColumnFormat return dataPoint & ~(HEIGHT_SHIFTED_MASK | DEPTH_SHIFTED_MASK) | height | depth; } - public static long version9Reorder(long dataPoint) - { - /* - |a |a |a |a |r |r |r |r | - |r |r |r |r |g |g |g |g | - |g |g |g |g |b |b |b |b | - |b |b |b |b |h |h |h |h | - |h |h |h |h |h |h |d |d | - |d |d |d |d |d |d |d |d | - |bl |bl |bl |bl |sl |sl |sl |sl | - |l |l |f |g |g |g |v |e | - */ - - if ((dataPoint & 1) == 0) - { - return 0; - } - - long height = (dataPoint >>> 26) & 0x3FF; - long depth = (dataPoint >>> 16) & 0x3FF; - - if (height == depth || (dataPoint & 0b10) == 0b10) - { - return createVoidDataPoint((byte) (((dataPoint >>> 2) & 0b111) + 1)); - } - - return ((dataPoint >>> 60) & 0xF) << ALPHA_SHIFT - | ((dataPoint >>> 52) & 0xFF) << RED_SHIFT - | ((dataPoint >>> 44) & 0xFF) << GREEN_SHIFT - | ((dataPoint >>> 36) & 0xFF) << BLUE_SHIFT - | ((dataPoint >>> 26) & 0x3FF) << HEIGHT_SHIFT - | ((dataPoint >>> 16) & 0x3FF) << DEPTH_SHIFT - | ((dataPoint >>> 8) & 0xFF) << SKY_LIGHT_SHIFT - | (((dataPoint >>> 2) & 0xFF) + 1) << GEN_TYPE_SHIFT; - } - public static short getHeight(long dataPoint) { return (short) ((dataPoint >>> HEIGHT_SHIFT) & HEIGHT_MASK); } public static short getDepth(long dataPoint) { return (short) ((dataPoint >>> DEPTH_SHIFT) & DEPTH_MASK); } @@ -238,28 +202,6 @@ public class ColumnFormat return (int) (((dataPoint >>> COLOR_SHIFT) & COLOR_MASK) | (alpha << (ALPHA_SHIFT - COLOR_SHIFT))); } - private static void shrinkArray(short[] array, int packetSize, int start, int length, int arraySize) - { - start *= packetSize; - length *= packetSize; - arraySize *= packetSize; - //remove comment to not leave garbage at the end - //array[start + packetSize + i] = 0; - if (arraySize - start >= 0) System.arraycopy(array, start + length, array, start, arraySize - start); - } - - private static void extendArray(short[] array, int packetSize, int start, int length, int arraySize) - { - start *= packetSize; - length *= packetSize; - arraySize *= packetSize; - for (int i = arraySize - start - 1; i >= 0; i--) - { - array[start + length + i] = array[start + i]; - array[start + i] = 0; - } - } - /** Return (>0) if dataA should replace dataB, (0) if equal, (<0) if dataB should replace dataA */ public static int compareDatapointPriority(long dataA, long dataB) { return (int) ((dataA >> COMPARE_SHIFT) - (dataB >> COMPARE_SHIFT)); }