Added different level
This commit is contained in:
@@ -274,10 +274,20 @@ public class LodNodeBufferBuilder
|
||||
|
||||
// get the desired LodTemplate and
|
||||
// add this LOD to the buffer
|
||||
|
||||
int distance = (int) Math.sqrt(Math.pow((mc.player.getX() - lod.startBlockPos.getX()),2) + Math.pow((mc.player.getZ() - lod.startBlockPos.getZ()),2));
|
||||
LodDetail detail;
|
||||
if(distance < 200){
|
||||
detail = LodDetail.HALF;
|
||||
}else if(distance < 400){
|
||||
detail = LodDetail.QUAD;
|
||||
}else if(distance < 600){
|
||||
detail = LodDetail.DOUBLE;
|
||||
}else{
|
||||
detail = LodDetail.SINGLE;
|
||||
}
|
||||
LodConfig.CLIENT.lodTemplate.get().
|
||||
template.addLodToBuffer(currentBuffer, lodDim, lod,
|
||||
xOffset , yOffset, zOffset, renderer.debugging);
|
||||
xOffset , yOffset, zOffset, renderer.debugging, detail);
|
||||
/*
|
||||
LodDetail detail = LodConfig.CLIENT.lodDetail.get();
|
||||
for(int x = 0; x < detail.dataPointLengthCount; x++){
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.seibel.lod.builders.lodNodeTemplates;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import com.seibel.lod.enums.LodDetail;
|
||||
import com.seibel.lod.objects.LodQuadTreeDimension;
|
||||
import com.seibel.lod.objects.LodQuadTreeNode;
|
||||
import com.seibel.lod.util.LodUtil;
|
||||
@@ -37,7 +38,7 @@ public abstract class AbstractLodNodeTemplate
|
||||
public abstract void addLodToBuffer(BufferBuilder buffer,
|
||||
LodQuadTreeDimension lodDim, LodQuadTreeNode lod,
|
||||
double xOffset, double yOffset, double zOffset,
|
||||
boolean debugging);
|
||||
boolean debugging, LodDetail detail) ;
|
||||
|
||||
/** add the given position and color to the buffer */
|
||||
protected void addPosAndColor(BufferBuilder buffer,
|
||||
|
||||
@@ -47,12 +47,12 @@ public class CubicLodNodeTemplate extends AbstractLodNodeTemplate
|
||||
public void addLodToBuffer(BufferBuilder buffer,
|
||||
LodQuadTreeDimension lodDim, LodQuadTreeNode lod,
|
||||
double xOffset, double yOffset, double zOffset,
|
||||
boolean debugging) {
|
||||
boolean debugging, LodDetail detail) {
|
||||
AxisAlignedBB bbox;
|
||||
|
||||
// Add this LOD to the BufferBuilder
|
||||
int halfWidth = LodQuadTreeNode.CHUNK_WIDTH / 2;
|
||||
LodDetail detail = LodConfig.CLIENT.lodDetail.get();
|
||||
//LodDetail detail = LodConfig.CLIENT.lodDetail.get();
|
||||
/*
|
||||
bbox = generateBoundingBox(
|
||||
lod.getLodDataPoint().height,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package com.seibel.lod.builders.lodNodeTemplates;
|
||||
|
||||
import com.seibel.lod.enums.LodDetail;
|
||||
import com.seibel.lod.objects.LodQuadTreeDimension;
|
||||
import com.seibel.lod.objects.LodQuadTreeNode;
|
||||
|
||||
@@ -37,7 +38,7 @@ public class DynamicLodNodeTemplate extends AbstractLodNodeTemplate
|
||||
public void addLodToBuffer(BufferBuilder buffer,
|
||||
LodQuadTreeDimension lodDim, LodQuadTreeNode lod,
|
||||
double xOffset, double yOffset, double zOffset,
|
||||
boolean debugging)
|
||||
boolean debugging, LodDetail detail)
|
||||
{
|
||||
System.err.println("DynamicLodTemplate not implemented!");
|
||||
}
|
||||
|
||||
+2
-1
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package com.seibel.lod.builders.lodNodeTemplates;
|
||||
|
||||
import com.seibel.lod.enums.LodDetail;
|
||||
import com.seibel.lod.objects.LodQuadTreeDimension;
|
||||
import com.seibel.lod.objects.LodQuadTreeNode;
|
||||
|
||||
@@ -35,7 +36,7 @@ public class TriangularLodNodeTemplate extends AbstractLodNodeTemplate
|
||||
public void addLodToBuffer(BufferBuilder buffer,
|
||||
LodQuadTreeDimension lodDim, LodQuadTreeNode lod,
|
||||
double xOffset, double yOffset, double zOffset,
|
||||
boolean debugging)
|
||||
boolean debugging, LodDetail detail)
|
||||
{
|
||||
System.err.println("DynamicLodTemplate not implemented!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user