com.jme3.terrain.geomipmap
Class MultiTerrainLodControl

java.lang.Object
  extended by com.jme3.scene.control.AbstractControl
      extended by com.jme3.terrain.geomipmap.TerrainLodControl
          extended by com.jme3.terrain.geomipmap.MultiTerrainLodControl
All Implemented Interfaces:
Savable, Control

public class MultiTerrainLodControl
extends TerrainLodControl

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
protected  class MultiTerrainLodControl.UpdateMultiLOD
          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
cameras, executor, indexer, lastCameraLocations, lodCalculator
 
Fields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
 
Constructor Summary
MultiTerrainLodControl(Camera camera)
           
MultiTerrainLodControl(java.util.List<Camera> cameras)
           
 
Method Summary
 void addTerrain(TerrainQuad tq)
          Add a terrain that will have its LOD handled by this control.
protected  TerrainLodControl.UpdateLOD getLodThread(java.util.List<Vector3f> locations, LodCalculator lodCalculator)
           
protected  void prepareTerrain()
           
 void removeTerrain(TerrainQuad tq)
          Add a terrain that will no longer have its LOD handled by this control.
 
Methods inherited from class com.jme3.terrain.geomipmap.TerrainLodControl
cloneForSpatial, controlRender, controlUpdate, createExecutorService, getLodCalculator, isLodCalcRunning, read, setCamera, setCameras, setEnabled, setLodCalcRunning, setLodCalculator, setSpatial, setTerrain, updateLOD, write
 
Methods inherited from class com.jme3.scene.control.AbstractControl
getSpatial, isEnabled, render, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTerrainLodControl

public MultiTerrainLodControl(java.util.List<Camera> cameras)

MultiTerrainLodControl

public MultiTerrainLodControl(Camera camera)
Method Detail

addTerrain

public void addTerrain(TerrainQuad tq)
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

public void removeTerrain(TerrainQuad tq)
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.


getLodThread

protected TerrainLodControl.UpdateLOD getLodThread(java.util.List<Vector3f> locations,
                                                   LodCalculator lodCalculator)
Overrides:
getLodThread in class TerrainLodControl

prepareTerrain

protected void prepareTerrain()
Overrides:
prepareTerrain in class TerrainLodControl