public class DistanceLodCalculator extends java.lang.Object implements LodCalculator
Constructor and Description |
---|
DistanceLodCalculator() |
DistanceLodCalculator(int patchSize,
float multiplier) |
Modifier and Type | Method and Description |
---|---|
boolean |
calculateLod(TerrainPatch terrainPatch,
java.util.List<Vector3f> locations,
java.util.HashMap<java.lang.String,UpdatedTerrainPatch> updates) |
DistanceLodCalculator |
clone() |
protected Vector3f |
getCenterLocation(TerrainPatch terrainPatch) |
protected float |
getLodDistanceThreshold()
Gets the camera distance where the LOD level will change
|
float |
getLodMultiplier() |
int |
getSize() |
boolean |
isLodOff() |
void |
read(JmeImporter im) |
void |
setLodMultiplier(float lodMultiplier) |
void |
setSize(int size) |
java.lang.String |
toString() |
void |
turnOffLod() |
void |
turnOnLod() |
boolean |
usesVariableLod()
Does this calculator require the terrain to have the difference of
LOD levels of neighbours to be more than 1.
|
void |
write(JmeExporter ex) |
public DistanceLodCalculator()
public DistanceLodCalculator(int patchSize, float multiplier)
public boolean calculateLod(TerrainPatch terrainPatch, java.util.List<Vector3f> locations, java.util.HashMap<java.lang.String,UpdatedTerrainPatch> updates)
calculateLod
in interface LodCalculator
protected Vector3f getCenterLocation(TerrainPatch terrainPatch)
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
public DistanceLodCalculator clone()
clone
in interface LodCalculator
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected float getLodDistanceThreshold()
public boolean usesVariableLod()
usesVariableLod
in interface LodCalculator
public float getLodMultiplier()
public void setLodMultiplier(float lodMultiplier)
public int getSize()
public void setSize(int size)
public void turnOffLod()
turnOffLod
in interface LodCalculator
public boolean isLodOff()
isLodOff
in interface LodCalculator
public void turnOnLod()
turnOnLod
in interface LodCalculator