rename ColumnFormatUtil -> RenderDatapointUtil and move to util package
This commit is contained in:
+11
-9
@@ -1,14 +1,16 @@
|
||||
package com.seibel.lod.core.datatype.column.accessor;
|
||||
|
||||
|
||||
import com.seibel.lod.core.util.RenderDatapointUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class ColumnArrayView implements IColumnDataView
|
||||
{
|
||||
final long[] data;
|
||||
final int size;
|
||||
final int offset; // offset in longs
|
||||
final int vertSize; // vertical size in longs
|
||||
public final long[] data;
|
||||
public final int size;
|
||||
public final int offset; // offset in longs
|
||||
public final int vertSize; // vertical size in longs
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +91,7 @@ public final class ColumnArrayView implements IColumnDataView
|
||||
{
|
||||
if (override)
|
||||
{
|
||||
if (ColumnFormatUtil.compareDatapointPriority(source.get(o), get(o)) >= 0)
|
||||
if (RenderDatapointUtil.compareDatapointPriority(source.get(o), get(o)) >= 0)
|
||||
{
|
||||
anyChange = true;
|
||||
System.arraycopy(source.data, source.offset + o, data, offset + o, vertSize);
|
||||
@@ -97,7 +99,7 @@ public final class ColumnArrayView implements IColumnDataView
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ColumnFormatUtil.compareDatapointPriority(source.get(o), get(o)) > 0)
|
||||
if (RenderDatapointUtil.compareDatapointPriority(source.get(o), get(o)) > 0)
|
||||
{
|
||||
anyChange = true;
|
||||
System.arraycopy(source.data, source.offset + o, data, offset + o, vertSize);
|
||||
@@ -121,7 +123,7 @@ public final class ColumnArrayView implements IColumnDataView
|
||||
{
|
||||
for (int i = 0; i < dataCount(); i++)
|
||||
{
|
||||
ColumnFormatUtil.mergeMultiData(source.subView(i, 1), subView(i, 1));
|
||||
RenderDatapointUtil.mergeMultiData(source.subView(i, 1), subView(i, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +135,7 @@ public final class ColumnArrayView implements IColumnDataView
|
||||
throw new IllegalArgumentException("output dataCount must be 1");
|
||||
}
|
||||
|
||||
ColumnFormatUtil.mergeMultiData(source, this);
|
||||
RenderDatapointUtil.mergeMultiData(source, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,7 +149,7 @@ public final class ColumnArrayView implements IColumnDataView
|
||||
sb.append(" [");
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
sb.append(ColumnFormatUtil.toString(data[offset + i]));
|
||||
sb.append(RenderDatapointUtil.toString(data[offset + i]));
|
||||
if (i < size - 1)
|
||||
{
|
||||
sb.append(",\n");
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.seibel.lod.core.level.IDhLevel;
|
||||
import com.seibel.lod.core.render.LodQuadTree;
|
||||
import com.seibel.lod.core.render.LodRenderSection;
|
||||
import com.seibel.lod.core.util.ColorUtil;
|
||||
import com.seibel.lod.core.util.RenderDatapointUtil;
|
||||
import com.seibel.lod.core.util.objects.Reference;
|
||||
import com.seibel.lod.core.util.LodUtil;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -155,7 +156,7 @@ public class ColumnRenderSource implements IColumnDatatype
|
||||
}
|
||||
|
||||
int dataOffset = posX * SECTION_SIZE * this.verticalDataCount + posZ * this.verticalDataCount;
|
||||
int compare = ColumnFormatUtil.compareDatapointPriority(newData.get(0), this.dataContainer[dataOffset]);
|
||||
int compare = RenderDatapointUtil.compareDatapointPriority(newData.get(0), this.dataContainer[dataOffset]);
|
||||
if (overwriteDataWithSameGenerationMode)
|
||||
{
|
||||
if (compare < 0)
|
||||
@@ -268,8 +269,8 @@ public class ColumnRenderSource implements IColumnDatatype
|
||||
|
||||
for (int i = 0; i < this.dataContainer.length; i += this.verticalDataCount)
|
||||
{
|
||||
int thisGenMode = ColumnFormatUtil.getGenerationMode(this.dataContainer[i]);
|
||||
int srcGenMode = ColumnFormatUtil.getGenerationMode(renderSource.dataContainer[i]);
|
||||
int thisGenMode = RenderDatapointUtil.getGenerationMode(this.dataContainer[i]);
|
||||
int srcGenMode = RenderDatapointUtil.getGenerationMode(renderSource.dataContainer[i]);
|
||||
|
||||
if (srcGenMode == 0)
|
||||
{
|
||||
|
||||
+29
-29
@@ -20,7 +20,7 @@
|
||||
package com.seibel.lod.core.datatype.render.bufferBuilding;
|
||||
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnArrayView;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnFormatUtil;
|
||||
import com.seibel.lod.core.util.RenderDatapointUtil;
|
||||
import com.seibel.lod.core.render.renderer.LodRenderer;
|
||||
import com.seibel.lod.core.enums.ELodDirection;
|
||||
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
|
||||
@@ -37,34 +37,34 @@ public class ColumnBox {
|
||||
short maxY = (short) (y + ySize);
|
||||
short maxZ = (short) (z + zSize);
|
||||
byte skyLightTop = skyLight;
|
||||
byte skyLightBot = ColumnFormatUtil.doesDataPointExist(botData) ? ColumnFormatUtil.getLightSky(botData) : 0;
|
||||
byte skyLightBot = RenderDatapointUtil.doesDataPointExist(botData) ? RenderDatapointUtil.getLightSky(botData) : 0;
|
||||
|
||||
boolean isTransparent = ColorUtil.getAlpha(color) < 255 && LodRenderer.transparencyEnabled;
|
||||
if (builder.skipQuadsWithZeroSkylight
|
||||
&& 0 == skyLight
|
||||
&& builder.skyLightCullingBelow > maxY
|
||||
&& ((ColumnFormatUtil.getAlpha(topData) < 255 && ColumnFormatUtil.getHeight(topData) >= builder.skyLightCullingBelow)
|
||||
|| (ColumnFormatUtil.getDepth(topData) >= builder.skyLightCullingBelow)
|
||||
|| !ColumnFormatUtil.doesDataPointExist(topData))) {
|
||||
&& ((RenderDatapointUtil.getAlpha(topData) < 255 && RenderDatapointUtil.getHeight(topData) >= builder.skyLightCullingBelow)
|
||||
|| (RenderDatapointUtil.getDepth(topData) >= builder.skyLightCullingBelow)
|
||||
|| !RenderDatapointUtil.doesDataPointExist(topData))) {
|
||||
maxY = builder.skyLightCullingBelow;
|
||||
}
|
||||
boolean isTopTransparent = ColumnFormatUtil.getAlpha(topData) < 255 && LodRenderer.transparencyEnabled;
|
||||
boolean isBotTransparent = ColumnFormatUtil.getAlpha(botData) < 255 && LodRenderer.transparencyEnabled;
|
||||
boolean isTopTransparent = RenderDatapointUtil.getAlpha(topData) < 255 && LodRenderer.transparencyEnabled;
|
||||
boolean isBotTransparent = RenderDatapointUtil.getAlpha(botData) < 255 && LodRenderer.transparencyEnabled;
|
||||
|
||||
|
||||
// Up direction case
|
||||
//We skip if
|
||||
// current block is not transparent: we check if the adj block is attached and opaque
|
||||
|
||||
boolean skipTop = ColumnFormatUtil.doesDataPointExist(topData) && (ColumnFormatUtil.getDepth(topData) == maxY) && !isTopTransparent;
|
||||
boolean skipBot = ColumnFormatUtil.doesDataPointExist(botData) && (ColumnFormatUtil.getHeight(botData) == y) && !isBotTransparent;
|
||||
boolean skipTop = RenderDatapointUtil.doesDataPointExist(topData) && (RenderDatapointUtil.getDepth(topData) == maxY) && !isTopTransparent;
|
||||
boolean skipBot = RenderDatapointUtil.doesDataPointExist(botData) && (RenderDatapointUtil.getHeight(botData) == y) && !isBotTransparent;
|
||||
if (LodRenderer.transparencyEnabled && LodRenderer.fakeOceanFloor) {
|
||||
if (!isTransparent && isTopTransparent && ColumnFormatUtil.doesDataPointExist(topData)) {
|
||||
skyLightTop = (byte) MathUtil.clamp(0, 15 - (ColumnFormatUtil.getHeight(topData) - y), 15);
|
||||
ySize = (short) (ColumnFormatUtil.getHeight(topData) - y - 1);
|
||||
if (!isTransparent && isTopTransparent && RenderDatapointUtil.doesDataPointExist(topData)) {
|
||||
skyLightTop = (byte) MathUtil.clamp(0, 15 - (RenderDatapointUtil.getHeight(topData) - y), 15);
|
||||
ySize = (short) (RenderDatapointUtil.getHeight(topData) - y - 1);
|
||||
//y = (short) (DataPointUtil.getHeight(topData) - 2);
|
||||
//ySize = 1;
|
||||
} else if (isTransparent && !isBotTransparent && ColumnFormatUtil.doesDataPointExist(botData)) {
|
||||
} else if (isTransparent && !isBotTransparent && RenderDatapointUtil.doesDataPointExist(botData)) {
|
||||
y = (short) (y + ySize - 1);
|
||||
ySize = 1;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public class ColumnBox {
|
||||
short z, short w0, short wy, int color, int overlapColor, byte upSkyLight, byte blockLight) {
|
||||
color = ColorUtil.applyShade(color, MC.getShade(direction));
|
||||
ColumnArrayView dataPoint = adjData;
|
||||
if (dataPoint == null || ColumnFormatUtil.isVoid(dataPoint.get(0))) {
|
||||
if (dataPoint == null || RenderDatapointUtil.isVoid(dataPoint.get(0))) {
|
||||
builder.addQuadAdj(direction, x, y, z, w0, wy, color, (byte) 15, blockLight);
|
||||
return;
|
||||
}
|
||||
@@ -166,24 +166,24 @@ public class ColumnBox {
|
||||
byte nextSkyLight = upSkyLight;
|
||||
boolean isTransparent = ColorUtil.getAlpha(color) < 255 && LodRenderer.transparencyEnabled;
|
||||
boolean lastWasTransparent = false;
|
||||
for (i = 0; i < dataPoint.size() && ColumnFormatUtil.doesDataPointExist(adjData.get(i))
|
||||
&& !ColumnFormatUtil.isVoid(adjData.get(i)); i++) {
|
||||
for (i = 0; i < dataPoint.size() && RenderDatapointUtil.doesDataPointExist(adjData.get(i))
|
||||
&& !RenderDatapointUtil.isVoid(adjData.get(i)); i++) {
|
||||
long adjPoint = adjData.get(i);
|
||||
|
||||
boolean isAdjTransparent = ColumnFormatUtil.getAlpha(adjPoint) < 255 && LodRenderer.transparencyEnabled;
|
||||
boolean isAdjTransparent = RenderDatapointUtil.getAlpha(adjPoint) < 255 && LodRenderer.transparencyEnabled;
|
||||
|
||||
if (!(!isTransparent && isAdjTransparent && LodRenderer.transparencyEnabled)) {
|
||||
|
||||
|
||||
short height = ColumnFormatUtil.getHeight(adjPoint);
|
||||
short depth = ColumnFormatUtil.getDepth(adjPoint);
|
||||
short height = RenderDatapointUtil.getHeight(adjPoint);
|
||||
short depth = RenderDatapointUtil.getDepth(adjPoint);
|
||||
|
||||
if (LodRenderer.transparencyEnabled && LodRenderer.fakeOceanFloor) {
|
||||
|
||||
if (lastWasTransparent && !isAdjTransparent) {
|
||||
height = (short) (ColumnFormatUtil.getHeight(adjData.get(i - 1)) - 1);
|
||||
height = (short) (RenderDatapointUtil.getHeight(adjData.get(i - 1)) - 1);
|
||||
} else if (isAdjTransparent && (i + 1) < adjData.size()) {
|
||||
if (ColumnFormatUtil.getAlpha(adjData.get(i + 1)) == 255) {
|
||||
if (RenderDatapointUtil.getAlpha(adjData.get(i + 1)) == 255) {
|
||||
depth = (short) (height - 1);
|
||||
}
|
||||
}
|
||||
@@ -201,14 +201,14 @@ public class ColumnBox {
|
||||
// Basically: _____ height < y < maxY
|
||||
// _______&&: depth ______ < y < maxY
|
||||
if (firstFace) {
|
||||
builder.addQuadAdj(direction, x, y, z, w0, wy, color, ColumnFormatUtil.getLightSky(adjPoint),
|
||||
builder.addQuadAdj(direction, x, y, z, w0, wy, color, RenderDatapointUtil.getLightSky(adjPoint),
|
||||
blockLight);
|
||||
} else {
|
||||
// Now: depth < height < y < previousDepth < maxY
|
||||
if (previousDepth == -1)
|
||||
throw new RuntimeException("Loop error");
|
||||
builder.addQuadAdj(direction, x, y, z, w0, (short) (previousDepth - y), color,
|
||||
ColumnFormatUtil.getLightSky(adjPoint), blockLight);
|
||||
RenderDatapointUtil.getLightSky(adjPoint), blockLight);
|
||||
previousDepth = -1;
|
||||
}
|
||||
break;
|
||||
@@ -234,14 +234,14 @@ public class ColumnBox {
|
||||
// if there was another face we finish the last one and break
|
||||
if (firstFace) {
|
||||
builder.addQuadAdj(direction, x, height, z, w0, (short) (y + wy - height), color,
|
||||
ColumnFormatUtil.getLightSky(adjPoint), blockLight);
|
||||
RenderDatapointUtil.getLightSky(adjPoint), blockLight);
|
||||
} else {
|
||||
// Now: depth <= y <= height <= previousDepth < maxY
|
||||
if (previousDepth == -1)
|
||||
throw new RuntimeException("Loop error");
|
||||
if (previousDepth > height) {
|
||||
builder.addQuadAdj(direction, x, height, z, w0, (short) (previousDepth - height), color,
|
||||
ColumnFormatUtil.getLightSky(adjPoint), blockLight);
|
||||
RenderDatapointUtil.getLightSky(adjPoint), blockLight);
|
||||
}
|
||||
previousDepth = -1;
|
||||
}
|
||||
@@ -267,14 +267,14 @@ public class ColumnBox {
|
||||
}
|
||||
if (firstFace) {
|
||||
builder.addQuadAdj(direction, x, height, z, w0, (short) (y + wy - height), color,
|
||||
ColumnFormatUtil.getLightSky(adjPoint), blockLight);
|
||||
RenderDatapointUtil.getLightSky(adjPoint), blockLight);
|
||||
} else {
|
||||
// Now: y < depth < height <= previousDepth < maxY
|
||||
if (previousDepth == -1)
|
||||
throw new RuntimeException("Loop error");
|
||||
if (previousDepth > height) {
|
||||
builder.addQuadAdj(direction, x, height, z, w0, (short) (previousDepth - height), color,
|
||||
ColumnFormatUtil.getLightSky(adjPoint), blockLight);
|
||||
RenderDatapointUtil.getLightSky(adjPoint), blockLight);
|
||||
}
|
||||
previousDepth = -1;
|
||||
}
|
||||
@@ -285,8 +285,8 @@ public class ColumnBox {
|
||||
previousDepth = depth;
|
||||
firstFace = false;
|
||||
nextSkyLight = upSkyLight;
|
||||
if (i + 1 < adjData.size() && ColumnFormatUtil.doesDataPointExist(adjData.get(i + 1)))
|
||||
nextSkyLight = ColumnFormatUtil.getLightSky(adjData.get(i + 1));
|
||||
if (i + 1 < adjData.size() && RenderDatapointUtil.doesDataPointExist(adjData.get(i + 1)))
|
||||
nextSkyLight = RenderDatapointUtil.getLightSky(adjData.get(i + 1));
|
||||
lastWasTransparent = isAdjTransparent;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -2,7 +2,7 @@ package com.seibel.lod.core.datatype.render.bufferBuilding;
|
||||
|
||||
import com.seibel.lod.core.datatype.render.ColumnRenderSource;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnArrayView;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnFormatUtil;
|
||||
import com.seibel.lod.core.util.RenderDatapointUtil;
|
||||
import com.seibel.lod.core.level.IDhClientLevel;
|
||||
import com.seibel.lod.core.render.renderer.LodRenderer;
|
||||
import com.seibel.lod.core.util.objects.UncheckedInterruptedException;
|
||||
@@ -333,8 +333,8 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer
|
||||
UncheckedInterruptedException.throwIfInterrupted();
|
||||
|
||||
ColumnArrayView posData = region.getVerticalDataPointView(x, z);
|
||||
if (posData.size() == 0 || !ColumnFormatUtil.doesDataPointExist(posData.get(0))
|
||||
|| ColumnFormatUtil.isVoid(posData.get(0)))
|
||||
if (posData.size() == 0 || !RenderDatapointUtil.doesDataPointExist(posData.get(0))
|
||||
|| RenderDatapointUtil.isVoid(posData.get(0)))
|
||||
continue;
|
||||
ColumnRenderSource.DebugSourceFlag debugSourceFlag = region.debugGetFlag(x, z);
|
||||
|
||||
@@ -409,11 +409,11 @@ public class ColumnRenderBuffer extends AbstractRenderBuffer
|
||||
long data = posData.get(i);
|
||||
// If the data is not renderable (Void or non-existing) we stop since there is
|
||||
// no data left in this position
|
||||
if (ColumnFormatUtil.isVoid(data) || !ColumnFormatUtil.doesDataPointExist(data))
|
||||
if (RenderDatapointUtil.isVoid(data) || !RenderDatapointUtil.doesDataPointExist(data))
|
||||
break;
|
||||
|
||||
long adjDataTop = i - 1 >= 0 ? posData.get(i - 1) : ColumnFormatUtil.EMPTY_DATA;
|
||||
long adjDataBot = i + 1 < posData.size() ? posData.get(i + 1) : ColumnFormatUtil.EMPTY_DATA;
|
||||
long adjDataTop = i - 1 >= 0 ? posData.get(i - 1) : RenderDatapointUtil.EMPTY_DATA;
|
||||
long adjDataBot = i + 1 < posData.size() ? posData.get(i + 1) : RenderDatapointUtil.EMPTY_DATA;
|
||||
|
||||
CubicLodTemplate.addLodToBuffer(data, adjDataTop, adjDataBot, adjData, detailLevel,
|
||||
x, z, quadBuilder, debugMode, debugSourceFlag);
|
||||
|
||||
+9
-9
@@ -20,7 +20,7 @@
|
||||
package com.seibel.lod.core.datatype.render.bufferBuilding;
|
||||
|
||||
import com.seibel.lod.core.datatype.render.ColumnRenderSource;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnFormatUtil;
|
||||
import com.seibel.lod.core.util.RenderDatapointUtil;
|
||||
import com.seibel.lod.api.enums.rendering.EDebugMode;
|
||||
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnArrayView;
|
||||
@@ -47,9 +47,9 @@ public class CubicLodTemplate
|
||||
|
||||
short width = (short) BitShiftUtil.powerOfTwo(detailLevel);
|
||||
short x = (short) blockOffsetPos.x;
|
||||
short y = ColumnFormatUtil.getDepth(data);
|
||||
short y = RenderDatapointUtil.getDepth(data);
|
||||
short z = (short) (short) blockOffsetPos.z;
|
||||
short dy = (short) (ColumnFormatUtil.getHeight(data) - y);
|
||||
short dy = (short) (RenderDatapointUtil.getHeight(data) - y);
|
||||
|
||||
if (dy == 0)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ public class CubicLodTemplate
|
||||
}
|
||||
else if (dy < 0)
|
||||
{
|
||||
throw new IllegalArgumentException("Negative y size for the data! Data: " + ColumnFormatUtil.toString(data));
|
||||
throw new IllegalArgumentException("Negative y size for the data! Data: " + RenderDatapointUtil.toString(data));
|
||||
}
|
||||
|
||||
int color;
|
||||
@@ -69,9 +69,9 @@ public class CubicLodTemplate
|
||||
float saturationMultiplier = (float)CONFIG.client().graphics().advancedGraphics().getSaturationMultiplier();
|
||||
float brightnessMultiplier = (float)CONFIG.client().graphics().advancedGraphics().getBrightnessMultiplier();
|
||||
if (saturationMultiplier == 1.0 && brightnessMultiplier == 1.0) {
|
||||
color = ColumnFormatUtil.getColor(data);
|
||||
color = RenderDatapointUtil.getColor(data);
|
||||
} else {
|
||||
float[] ahsv = ColorUtil.argbToAhsv(ColumnFormatUtil.getColor(data));
|
||||
float[] ahsv = ColorUtil.argbToAhsv(RenderDatapointUtil.getColor(data));
|
||||
color = ColorUtil.ahsvToArgb(ahsv[0], ahsv[1], ahsv[2] * saturationMultiplier, ahsv[3] * brightnessMultiplier);
|
||||
//ApiShared.LOGGER.info("Raw color:[{}], AHSV:{}, Out color:[{}]",
|
||||
// ColorUtil.toString(DataPointUtil.getColor(data)),
|
||||
@@ -89,7 +89,7 @@ public class CubicLodTemplate
|
||||
case SHOW_GENMODE:
|
||||
case SHOW_GENMODE_WIREFRAME:
|
||||
{
|
||||
color = LodUtil.DEBUG_DETAIL_LEVEL_COLORS[ColumnFormatUtil.getGenerationMode(data)];
|
||||
color = LodUtil.DEBUG_DETAIL_LEVEL_COLORS[RenderDatapointUtil.getGenerationMode(data)];
|
||||
fullBright = true;
|
||||
break;
|
||||
}
|
||||
@@ -114,8 +114,8 @@ public class CubicLodTemplate
|
||||
width, dy, width, // setWidth
|
||||
x, y, z, // setOffset
|
||||
color, // setColor
|
||||
ColumnFormatUtil.getLightSky(data), // setSkyLights
|
||||
fullBright ? 15 : ColumnFormatUtil.getLightBlock(data), // setBlockLights
|
||||
RenderDatapointUtil.getLightSky(data), // setSkyLights
|
||||
fullBright ? 15 : RenderDatapointUtil.getLightBlock(data), // setBlockLights
|
||||
topData, botData, adjData); // setAdjData
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.seibel.lod.core.datatype.transform;
|
||||
|
||||
import com.seibel.lod.core.datatype.full.IIncompleteFullDataSource;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnFormatUtil;
|
||||
import com.seibel.lod.core.util.RenderDatapointUtil;
|
||||
import com.seibel.lod.core.datatype.render.ColumnRenderSource;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnArrayView;
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnQuadView;
|
||||
@@ -180,12 +180,12 @@ public class FullToColumnTransformer {
|
||||
if (block.equals(AIR)) continue;
|
||||
isVoid = false;
|
||||
int color = level.computeBaseColor(new DhBlockPos(blockX, bottomY + level.getMinY(), blockZ), biome, block);
|
||||
long columnData = ColumnFormatUtil.createDataPoint(bottomY + blockHeight, bottomY, color, light, genMode);
|
||||
long columnData = RenderDatapointUtil.createDataPoint(bottomY + blockHeight, bottomY, color, light, genMode);
|
||||
column.set(offset, columnData);
|
||||
offset++;
|
||||
}
|
||||
if (isVoid) {
|
||||
column.set(0, ColumnFormatUtil.createVoidDataPoint((byte) genMode));
|
||||
column.set(0, RenderDatapointUtil.createVoidDataPoint((byte) genMode));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -17,11 +17,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.core.datatype.column.accessor;
|
||||
package com.seibel.lod.core.util;
|
||||
|
||||
import com.seibel.lod.core.datatype.column.accessor.ColumnArrayView;
|
||||
import com.seibel.lod.core.datatype.column.accessor.IColumnDataView;
|
||||
import com.seibel.lod.core.logging.SpamReducedLogger;
|
||||
import com.seibel.lod.core.util.ColorUtil;
|
||||
import com.seibel.lod.core.util.LodUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Arrays;
|
||||
* A helper class that is used to access the data in a RenderColumn
|
||||
* long datapoint.
|
||||
*/
|
||||
public class ColumnFormatUtil
|
||||
public class RenderDatapointUtil
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -319,8 +319,8 @@ public class ColumnFormatUtil
|
||||
for (int index = 0; index < dataCount; index++)
|
||||
{
|
||||
tempData = sourceData.get(index * inputVerticalSize);
|
||||
allVoid = allVoid && ColumnFormatUtil.isVoid(tempData);
|
||||
allEmpty = allEmpty && !ColumnFormatUtil.doesDataPointExist(tempData);
|
||||
allVoid = allVoid && RenderDatapointUtil.isVoid(tempData);
|
||||
allEmpty = allEmpty && !RenderDatapointUtil.doesDataPointExist(tempData);
|
||||
}
|
||||
|
||||
//We check if there is any data that's not empty or void
|
||||
@@ -354,10 +354,10 @@ public class ColumnFormatUtil
|
||||
if (indices[index] < inputVerticalSize)
|
||||
{
|
||||
tempData = sourceData.get(index * inputVerticalSize + indices[index]);
|
||||
if (!ColumnFormatUtil.isVoid(tempData) && ColumnFormatUtil.doesDataPointExist(tempData))
|
||||
if (!RenderDatapointUtil.isVoid(tempData) && RenderDatapointUtil.doesDataPointExist(tempData))
|
||||
{
|
||||
tempHeight = ColumnFormatUtil.getHeight(tempData);
|
||||
tempDepth = ColumnFormatUtil.getDepth(tempData);
|
||||
tempHeight = RenderDatapointUtil.getHeight(tempData);
|
||||
tempDepth = RenderDatapointUtil.getDepth(tempData);
|
||||
if (tempDepth >= newHeight)
|
||||
{
|
||||
//First case
|
||||
@@ -452,7 +452,7 @@ public class ColumnFormatUtil
|
||||
if (indices[index] < inputVerticalSize)
|
||||
{
|
||||
tempData = sourceData.get(index * inputVerticalSize + indices[index]);
|
||||
stillHasDataToCheck |= !ColumnFormatUtil.isVoid(tempData) && ColumnFormatUtil.doesDataPointExist(tempData);
|
||||
stillHasDataToCheck |= !RenderDatapointUtil.isVoid(tempData) && RenderDatapointUtil.doesDataPointExist(tempData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user