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
Modifier and TypeClassDescriptionprotected class
Overrides 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, useRenderCamera
Fields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
-
Constructor Summary
ConstructorDescriptionMultiTerrainLodControl
(Camera camera) MultiTerrainLodControl
(Terrain terrain) MultiTerrainLodControl
(Terrain terrain, Camera camera) MultiTerrainLodControl
(Terrain terrain, List<Camera> cameras) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a terrain that will have its LOD handled by this control.protected TerrainLodControl.UpdateLOD
createLodUpdateTask
(List<Vector3f> locations, LodCalculator lodCalculator) protected DistanceLodCalculator
protected void
void
Add 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, write
Methods 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:
makeLodCalculator
in 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:
createLodUpdateTask
in classTerrainLodControl
-
prepareTerrain
protected void prepareTerrain()- Overrides:
prepareTerrain
in classTerrainLodControl
-