com.jme3.terrain.geomipmap.lodcalc
Class PerspectiveLodCalculator
java.lang.Object
com.jme3.terrain.geomipmap.lodcalc.PerspectiveLodCalculator
- All Implemented Interfaces:
- Savable, LodCalculator, java.lang.Cloneable
public class PerspectiveLodCalculator
- extends java.lang.Object
- implements LodCalculator
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerspectiveLodCalculator
public PerspectiveLodCalculator()
PerspectiveLodCalculator
public PerspectiveLodCalculator(Camera cam,
float pixelError)
calculateLod
public boolean calculateLod(java.util.List<Vector3f> locations,
java.util.HashMap<java.lang.String,UpdatedTerrainPatch> updates)
calculateLod
public boolean calculateLod(TerrainPatch terrainPatch,
java.util.List<Vector3f> locations,
java.util.HashMap<java.lang.String,UpdatedTerrainPatch> updates)
- Specified by:
calculateLod
in interface LodCalculator
getCenterLocation
public Vector3f getCenterLocation(TerrainPatch patch)
clone
public LodCalculator clone()
- Specified by:
clone
in interface LodCalculator
- Overrides:
clone
in class java.lang.Object
write
public void write(JmeExporter ex)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Throws:
java.io.IOException
read
public void read(JmeImporter im)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Throws:
java.io.IOException
usesVariableLod
public boolean usesVariableLod()
- Description copied from interface:
LodCalculator
- If true, then this calculator can cause neighbouring terrain chunks to
have LOD levels that are greater than 1 apart.
Entropy algorithms will want to return true for this. Straight distance
calculations will just want to return false.
- Specified by:
usesVariableLod
in interface LodCalculator
getPixelError
public float getPixelError()
setPixelError
public void setPixelError(float pixelError)
setCam
public void setCam(Camera cam)
turnOffLod
public void turnOffLod()
- Specified by:
turnOffLod
in interface LodCalculator
isLodOff
public boolean isLodOff()
- Specified by:
isLodOff
in interface LodCalculator
turnOnLod
public void turnOnLod()
- Specified by:
turnOnLod
in interface LodCalculator