Added max detail at FULL

This commit is contained in:
Leonardo
2021-09-10 18:21:46 +02:00
parent 3f1cf6c305
commit 59bfd739f4
2 changed files with 11 additions and 5 deletions
@@ -59,7 +59,7 @@ public class LodRegion
/*if(twoDimension){
dataContainer[lod] = new SingleLevelContainer(lod);
}else{
dataContainer[lod] = new VerticalLevelContainer(lod);
dataContainer[lod] = new VerticalLevelContainer.java(lod);
}*/
}
}
@@ -132,11 +132,11 @@ public class LodRegion
int childSize = 1 << (LodUtil.REGION_DETAIL_LEVEL - childDetailLevel);
//we have reached the target detail level
if (DetailDistanceUtil.getDistanceGenerationInverse(maxDistance) > detailLevel)
byte targetDetailLevel = DetailDistanceUtil.getLodGenDetail(DetailDistanceUtil.getDistanceGenerationInverse(maxDistance)).detailLevel;
if (targetDetailLevel > detailLevel)
{
return;
} else if (DetailDistanceUtil.getDistanceGenerationInverse(maxDistance) == detailLevel)
} else if (targetDetailLevel == detailLevel)
{
if (!doesDataExist(detailLevel, posX, posZ))
{
@@ -160,7 +160,13 @@ public class DetailDistanceUtil
public static byte getLodDrawDetail(int detail)
{
return (byte) Math.max(detail, minDrawDetail);
if (detail < minGenDetail)
{
return lodGenDetails[minGenDetail].detailLevel;
} else
{
return lodGenDetails[detail].detailLevel;
}
}
public static LodDetail getLodGenDetail(int detail)