Package com.jme3.terrain.geomipmap
Class MultiTerrainLodControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.terrain.geomipmap.TerrainLodControl
com.jme3.terrain.geomipmap.MultiTerrainLodControl
- All Implemented Interfaces:
Savable,Control,JmeCloneable,Cloneable
An extension of the TerrainLodControl that handles
multiple terrains at once. This is to be used if you
have your own tiling/paging terrain system, such as
TerrainGrid.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classOverrides the parent UpdateLOD runnable to process multiple terrains.Nested classes/interfaces inherited from class com.jme3.terrain.geomipmap.TerrainLodControl
TerrainLodControl.UpdateLOD -
Field Summary
Fields inherited from class com.jme3.terrain.geomipmap.TerrainLodControl
camera, cameraLocations, cameras, forceUpdate, hasResetLod, indexer, lastCameraLocations, lodCalcRunning, lodCalculator, previousCameraLocation, terrain, useRenderCameraFields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial -
Constructor Summary
ConstructorsConstructorDescriptionMultiTerrainLodControl(Camera camera) MultiTerrainLodControl(Terrain terrain) MultiTerrainLodControl(Terrain terrain, Camera camera) MultiTerrainLodControl(Terrain terrain, List<Camera> cameras) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a terrain that will have its LOD handled by this control.protected TerrainLodControl.UpdateLODcreateLodUpdateTask(List<Vector3f> locations, LodCalculator lodCalculator) protected DistanceLodCalculatorprotected voidvoidAdd a terrain that will no longer have its LOD handled by this control.Methods inherited from class com.jme3.terrain.geomipmap.TerrainLodControl
cloneFields, controlRender, controlUpdate, detachAndCleanUpControl, forceUpdate, getLodCalculator, isUseRenderCamera, jmeClone, read, setCamera, setCameras, setEnabled, setLodCalculator, setSpatial, setTerrain, setUseRenderCamera, updateLOD, updateLOD, updateLodOffCount, writeMethods inherited from class com.jme3.scene.control.AbstractControl
cloneForSpatial, getSpatial, isEnabled, render, update
-
Constructor Details
-
MultiTerrainLodControl
public MultiTerrainLodControl() -
MultiTerrainLodControl
-
MultiTerrainLodControl
-
MultiTerrainLodControl
-
MultiTerrainLodControl
-
-
Method Details
-
makeLodCalculator
- Overrides:
makeLodCalculatorin classTerrainLodControl
-
addTerrain
Add a terrain that will have its LOD handled by this control. It will be added next update run. You should only call this from the render thread. -
removeTerrain
Add a terrain that will no longer have its LOD handled by this control. It will be removed next update run. You should only call this from the render thread. -
createLodUpdateTask
protected TerrainLodControl.UpdateLOD createLodUpdateTask(List<Vector3f> locations, LodCalculator lodCalculator) - Overrides:
createLodUpdateTaskin classTerrainLodControl
-
prepareTerrain
protected void prepareTerrain()- Overrides:
prepareTerrainin classTerrainLodControl
-