Class PerspectiveLodCalculator
java.lang.Object
com.jme3.terrain.geomipmap.lodcalc.PerspectiveLodCalculator
- All Implemented Interfaces:
Savable
,LodCalculator
,Cloneable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
calculateLod
(TerrainPatch patch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) clone()
getCenterLocation
(TerrainPatch patch) float
boolean
isLodOff()
void
read
(JmeImporter im) void
void
setPixelError
(float pixelError) void
void
boolean
If true, then this calculator can cause neighbouring terrain chunks to have LOD levels that are greater than 1 apart.void
write
(JmeExporter ex)
-
Constructor Details
-
PerspectiveLodCalculator
public PerspectiveLodCalculator() -
PerspectiveLodCalculator
-
-
Method Details
-
calculateLod
public boolean calculateLod(TerrainPatch patch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) - Specified by:
calculateLod
in interfaceLodCalculator
-
getCenterLocation
-
clone
- Specified by:
clone
in interfaceLodCalculator
- Overrides:
clone
in classObject
-
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
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 interfaceLodCalculator
-
getPixelError
public float getPixelError() -
setPixelError
public void setPixelError(float pixelError) -
setCam
-
turnOffLod
public void turnOffLod()- Specified by:
turnOffLod
in interfaceLodCalculator
-
isLodOff
public boolean isLodOff()- Specified by:
isLodOff
in interfaceLodCalculator
-
turnOnLod
public void turnOnLod()- Specified by:
turnOnLod
in interfaceLodCalculator
-