Class DistanceLodCalculator
java.lang.Object
com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator
- All Implemented Interfaces:
- Savable,- LodCalculator,- Cloneable
Calculates the LOD of the terrain based on its distance from the
 cameras. Taking the minimum distance from all cameras.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancalculateLod(TerrainPatch terrainPatch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) clone()protected Vector3fgetCenterLocation(TerrainPatch terrainPatch) protected floatGets the camera distance where the LOD level will changefloatintgetSize()booleanisLodOff()voidread(JmeImporter im) voidsetLodMultiplier(float lodMultiplier) voidsetSize(int size) toString()voidvoidbooleanDoes this calculator require the terrain to have the difference of LOD levels of neighbours to be more than 1.voidwrite(JmeExporter ex) 
- 
Constructor Details- 
DistanceLodCalculatorpublic DistanceLodCalculator()
- 
DistanceLodCalculatorpublic DistanceLodCalculator(int patchSize, float multiplier) 
 
- 
- 
Method Details- 
calculateLodpublic boolean calculateLod(TerrainPatch terrainPatch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) - Specified by:
- calculateLodin interface- LodCalculator
 
- 
getCenterLocation
- 
write- Specified by:
- writein interface- Savable
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Savable
- Throws:
- IOException
 
- 
clone- Specified by:
- clonein interface- LodCalculator
- Overrides:
- clonein class- Object
 
- 
toString
- 
getLodDistanceThresholdprotected float getLodDistanceThreshold()Gets the camera distance where the LOD level will change
- 
usesVariableLodpublic boolean usesVariableLod()Does this calculator require the terrain to have the difference of LOD levels of neighbours to be more than 1.- Specified by:
- usesVariableLodin interface- LodCalculator
 
- 
getLodMultiplierpublic float getLodMultiplier()
- 
setLodMultiplierpublic void setLodMultiplier(float lodMultiplier) 
- 
getSizepublic int getSize()
- 
setSizepublic void setSize(int size) 
- 
turnOffLodpublic void turnOffLod()- Specified by:
- turnOffLodin interface- LodCalculator
 
- 
isLodOffpublic boolean isLodOff()- Specified by:
- isLodOffin interface- LodCalculator
 
- 
turnOnLodpublic void turnOnLod()- Specified by:
- turnOnLodin interface- LodCalculator
 
 
-